/* ---------- THEME VARIABLES ---------- */
:root {
  --bg: #0a0a0b;
  --card: #111113;
  --card-hover: #151517;
  --muted: #9ca3af;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.15);
  --glass: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
}

/* ---------- BASE ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, var(--bg) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
  min-height: calc(100vh - 40px);
}

@media (max-width: 1200px) {
  .wrap {
    grid-template-columns: 320px 1fr;
    gap: 25px;
  }
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  body {
    padding: 15px;
  }
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

/* ---------- CARDS ---------- */
.card {
  background: linear-gradient(145deg, var(--card) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

/* ---------- PROFILE ---------- */
.profile-card {
  text-align: center;
}

.profile {
  margin-bottom: 24px;
}

.photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--border);
  box-shadow: 0 8px 32px var(--accent-glow);
  overflow: hidden;
  position: relative;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.role {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
}

.location {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.link-item:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateX(4px);
}

.link-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.resume-link {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  font-weight: 600;
}

.resume-link:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: white;
  transform: translateX(4px) scale(1.02);
}

/* ---------- SIDEBAR SECTIONS ---------- */
.card h3 {
  color: var(--accent-light);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.education-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.education-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.degree {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.school {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.school a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.school a:hover {
  color: var(--accent-light);
}

.advisors {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 4px;
}

.year {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- NEWS ---------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.news-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.news-date {
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.news-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.main-content h2 {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
}

.main-content h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
}

/* ---------- ABOUT ---------- */
.about-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card a {
  color: #8f7bff; 
  font-weight: 600;
  text-decoration: none;
}

.about-card a:hover {
  text-decoration: underline;
  color: #8f7bff; /* lighter amber on hover */
}



/* ---------- PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.project:hover::before {
  transform: scaleX(1);
}

.project:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project h4 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.project p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.project-links a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.project-links a:hover {
  background: var(--accent);
  color: white;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-light);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ---------- PUBLICATIONS ---------- */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.publication {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s ease;
}

.publication:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.pub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

.pub-links {
  display: flex;
  gap: 10px;
}

.pub-links a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.pub-links a:hover {
  background: var(--accent);
  color: white;
}

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .sidebar {
    position: static;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .main-content h2 {
    font-size: 1.3rem;
  }
}