/* ========================================
   Minimal/Clean Design Framework
   ======================================== */

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

:root {
  --primary-color: #8B2E2E;
  --secondary-color: #C41E3A;
  --accent-color: #DC143C;
  --light-bg: #F5F1F1;
  --text-dark: #3D2424;
  --text-light: #6B5555;
  --border-color: #E8D5D5;
  --white: #ffffff;
  --spacing-unit: 1rem;
  --transition: all 0.3s ease;
}

/* Typography */
body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 3.5rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 3.5rem 0;
}

/* Container & Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  gap: 3rem;
}

.container-lg {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Sidebar Styles */
.left-sidebar {
  width: 250px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.right-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
  height: fit-content;
  align-self: flex-start;
}

.profile-photo {
  width: 100%;
  max-width: 280px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  margin-bottom: 2rem;
}

/* Intro Section */
.intro-name {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.75rem;
  margin-top: 0;
}

/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.5rem 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  transition: var(--transition);
}

.logo:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 400;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--secondary-color);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--secondary-color);
  border-radius: 4px;
  color: var(--secondary-color);
  background-color: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--secondary-color);
  color: var(--white);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

.btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
}

.btn-accent {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-accent:hover {
  background-color: var(--accent-color);
  color: var(--white);
  border-color: var(--accent-color);
}

/* Section */
section {
  padding: 3.5rem 0;
  margin-bottom: 1.5rem;
}

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

section.dark {
  background-color: var(--primary-color);
  color: var(--white);
}

section.dark h2,
section.dark h3,
section.dark h4 {
  color: var(--white);
}

section.dark p {
  color: rgba(255, 255, 255, 0.8);
}

section.dark a {
  color: var(--secondary-color);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
}

section.light .card {
  background-color: var(--white);
}

section.dark .card {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

section.dark .card h3 {
  color: var(--white);
}

section.dark .card p {
  color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--secondary-color);
}

footer a:hover {
  color: var(--white);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 1200px) {
  .container {
    gap: 2rem;
  }
  
  .left-sidebar {
    width: 200px !important;
  }
  
  .right-sidebar {
    width: 220px !important;
  }
}

@media (max-width: 1024px) {
  .container {
    flex-direction: column !important;
    padding: 1.5rem !important;
  }
  
  .left-sidebar {
    width: 100% !important;
    flex-shrink: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 1.5rem !important;
    margin-bottom: 1rem;
  }
  
  .left-sidebar .profile-photo {
    width: 120px !important;
    max-width: 120px !important;
    flex-shrink: 0;
  }
  
  .left-sidebar .sidebar-section {
    flex: 1;
  }
  
  .main-content {
    width: 100%;
    order: 2;
  }
  
  .right-sidebar {
    width: 100% !important;
    flex-shrink: 1 !important;
    order: 3;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-center {
    gap: 0.75rem;
  }
  
  .nav-center a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; margin-top: 2.5rem; }
  h3 { font-size: 1.15rem; }

  body {
    font-size: 16px;
  }

  .container {
    padding: 1rem !important;
  }
  
  .left-sidebar {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }
  
  .left-sidebar .profile-photo {
    width: 150px !important;
    max-width: 150px !important;
  }

  hr {
    margin: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  header nav {
    padding: 0.5rem 1rem;
  }
  
  .nav-center {
    gap: 0.5rem;
  }
  
  .nav-center a {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .container {
    padding: 0.75rem !important;
  }
  
  .left-sidebar .profile-photo {
    width: 120px !important;
    max-width: 120px !important;
  }
  
  .pub-item {
    font-size: 0.9rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-unit); }
.mt-2 { margin-top: calc(var(--spacing-unit) * 2); }
.mt-3 { margin-top: calc(var(--spacing-unit) * 3); }
.mt-4 { margin-top: calc(var(--spacing-unit) * 4); }

.mb-1 { margin-bottom: var(--spacing-unit); }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 2); }
.mb-3 { margin-bottom: calc(var(--spacing-unit) * 3); }
.mb-4 { margin-bottom: calc(var(--spacing-unit) * 4); }

.py-1 { padding-top: var(--spacing-unit); padding-bottom: var(--spacing-unit); }
.py-2 { padding-top: calc(var(--spacing-unit) * 2); padding-bottom: calc(var(--spacing-unit) * 2); }
.py-3 { padding-top: calc(var(--spacing-unit) * 3); padding-bottom: calc(var(--spacing-unit) * 3); }
.py-4 { padding-top: calc(var(--spacing-unit) * 4); padding-bottom: calc(var(--spacing-unit) * 4); }

.hidden { display: none; }
.visible { display: block; }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dark);
}

/* Feed styles */
.feed-list { display: flex; flex-direction: column; gap: 0.4rem; }
.feed-item { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border-color); background: var(--white); }
.feed-item:hover { background: var(--light-bg); }
.feed-title { display: block; color: var(--primary-color); font-weight: 600; margin-bottom: 0.25rem; }
.feed-meta { font-size: 12px; color: var(--text-light); margin-bottom: 0.4rem; }
.feed-desc { font-size: 13px; color: var(--text-light); }

.twitter-feed-container, .scholar-feed { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); background: var(--white); }
.twitter-feed-container h3, .scholar-feed h3 { margin: 0; padding: 1rem; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; font-size: 0.95rem; }
.feed-placeholder { padding: 1rem; color: var(--text-light); }

/* Back-to-top button */
#backToTop {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(139, 46, 46, 0.2);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

#backToTop.show { display: flex; opacity: 1; transform: translateY(0); }
#backToTop:hover { transform: translateY(-4px); }

/* Nav helper classes (replace inline styles) */
.nav-start { width: 60px; }
.nav-center { flex: 1; display: flex; gap: 2rem; justify-content: center; }
.nav-end { width: 60px; }

/* Sidebar Quick Links */
.sidebar-section a:hover {
  background: #f0f0f0 !important;
}

.sidebar-section div[style*="border-left"]:hover {
  border-left-color: var(--secondary-color) !important;
  background: #f5f0f0 !important;
}

/* Minimal icon links hover */
.sidebar-section a[title]:hover {
  color: #333 !important;
  background: transparent !important;
}
