/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4f4f4f;
  --text-color: #333;
  --bg-color: #ffffff;
  --secondary-bg: #f8f9fa;
  --border-color: #e0e0e0;
  --link-color: #1e7a3e;
  --link-hover: #155c2e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background-color: var(--primary-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
}

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

.nav-menu a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.nav-menu a:hover {
  opacity: 0.8;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.subtitle {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 2rem;
}

/* Page Links */
.page-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 1.25rem;
}

.page-links a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s, transform 0.3s;
  font-weight: 500;
}

.page-links a i {
  margin-right: 0.5rem;
  width: 1.2rem;
  display: inline-block;
  text-align: center;
}

.page-links a:hover {
  color: var(--link-color);
  transform: translateX(5px);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  font-size: 2rem;
}

.social-links a {
  color: var(--primary-color);
  transition: color 0.3s;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
}

.social-links a:hover {
  color: var(--link-color);
}

.social-links a i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.6s, max-width 0.6s;
  font-weight: 500;
  white-space: nowrap;
}

.social-links a:hover .social-label {
  opacity: 1;
  max-width: 150px;
}

/* Content Pages */
.content {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

.content h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.content h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #555;
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content a {
  color: var(--link-color);
  text-decoration: none;
}

.content a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.content ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.content li {
  margin-bottom: 0.5rem;
}

/* Research Section Specific */
.research-item {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.research-item:last-child {
  border-bottom: none;
}

.presentation-links,
.paper-links {
  margin-top: 0.5rem;
}

.presentation-links a,
.paper-links a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary-bg);
  border-radius: 4px;
  font-size: 0.9rem;
}

.presentation-links a:hover,
.paper-links a:hover {
  background-color: var(--border-color);
  text-decoration: none;
}

/* CV iframe */
.cv-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cv-container iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: none;
}

/* Header */
header {
  background-color: var(--secondary-bg);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  max-width: 100%;
  padding: 0 2rem;
}

.header-links {
  display: flex;
  gap: 1.5rem;
  font-size: 1.5rem;
}

.header-links a {
  color: var(--primary-color);
  transition: color 0.3s;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
}

.header-links a:hover {
  color: var(--link-color);
}

.header-links a i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.6s, max-width 0.6s;
  font-weight: 500;
  white-space: nowrap;
  font-size: 1rem;
}

.header-links a:hover .header-label {
  opacity: 1;
  max-width: 150px;
}

.header-links.initial-show .header-label {
  opacity: 1;
  max-width: 150px;
}

/* Footer */
footer {
  background-color: var(--secondary-bg);
  padding: 0.65rem 0;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 100%;
  padding: 0 2rem;
}

footer .social-links {
  gap: 1.5rem;
  font-size: 1.5rem;
  margin: 0;
}

footer .social-links .social-label {
  font-size: 1rem;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--link-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }

  .social-links {
    font-size: 1.5rem;
    gap: 1.5rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .content h1 {
    font-size: 2rem;
  }

  .content h2 {
    font-size: 1.5rem;
  }
}

/* Academic Figure Styles */
.academic-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.academic-content .container {
  max-width: 900px;
  display: flex;
  align-items: center;
}

.academic-figure {
  margin: 0 0 3rem 0;
  padding: 0;
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.academic-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border-color);
}

.academic-figure figcaption {
  padding: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
  text-align: justify;
}

.figure-label {
  font-weight: 700;
  color: #000;
}

.figure-title {
  font-weight: 600;
  font-style: italic;
  color: #000;
}

.figure-description {
  color: #444;
}

.academic-content .page-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.academic-content .page-links a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s, transform 0.3s;
  font-weight: 500;
  font-size: 1.1rem;
}

.academic-content .page-links a i {
  margin-right: 0.5rem;
  width: 1.2rem;
  display: inline-block;
  text-align: center;
}

.academic-content .page-links a:hover {
  color: var(--link-color);
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .academic-figure figcaption {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .academic-content {
    padding: 2rem 0;
  }
}