/* ===========================
   Root Variables & Base Styles
   =========================== */

:root {
  --primary-color: #1a73e8;
  --secondary-color: #333;
  --accent-color: #4285f4;
  --text-light: #fff;
  --text-dark: #333;
  --background-dark: #1a1a1a;
  --background-light: #f5f5f5;
  --border-color: #e0e0e0;
  --transition-duration: 0.3s;
  --navbar-height: 80px;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background-dark);
  color: var(--text-dark);
  background-attachment: fixed;
  background-repeat: repeat;
}

body {
  overflow: hidden; /* Prevent body scroll, use scroll-container instead */
  position: relative;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-duration) ease;
}

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

/* ===========================
   Layout
   =========================== */

#app {
  display: flex;
  width: 100%;
  height: 100vh;
  flex-direction: column;
  background-color: transparent;
  position: relative;
  z-index: 1;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.95) 0%, rgba(66, 133, 244, 0.95) 100%);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.navbar-logo {
  color: var(--text-light);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: color var(--transition-duration) ease;
  display: block;
  padding: 5px 0;
}

.nav-link:hover {
  color: var(--text-light);
}

.nav-link.active {
  color: var(--text-light);
  border-bottom: 2px solid var(--text-light);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--text-light);
  transition: width var(--transition-duration) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===========================
   Scroll Container
   =========================== */

.scroll-container {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-behavior: smooth;
  margin-top: var(--navbar-height);
  background-color: transparent;
}

/* Custom scrollbar */
.scroll-container::-webkit-scrollbar {
  width: 8px;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ===========================
   Page Sections
   =========================== */

.page-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.section-content {
  max-width: 1000px;
  width: 100%;
  animation: fadeInUp 0.8s ease-out;
}

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

/* Home Section */
.home-section {
  background: linear-gradient(135deg, rgba(110, 110, 110, 0.6) 0%, rgba(80, 80, 80, 0.6) 100%);
  color: var(--text-light);
}

.profile-card {
  text-align: center;
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-image {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  margin-bottom: 30px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.profile-name {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.profile-headline {
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 30px;
  opacity: 0.95;
}

.profile-headline a {
  color: #fff;
  text-decoration: underline;
}

.profile-headline a:hover {
  color: var(--accent-color);
}

.bio-paragraph a {
  color: #000;
  text-decoration: underline;
}

.bio-paragraph a:hover {
  color: var(--primary-color);
}

.profile-quote {
  font-size: 20px;
  font-style: italic;
  margin: 30px 0;
  padding: 20px;
  border-left: 4px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.profile-quote p {
  margin-bottom: 10px;
  font-size: 18px;
}

.profile-quote footer {
  font-size: 14px;
  opacity: 0.9;
  text-align: right;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  transition: all var(--transition-duration) ease;
  font-size: 20px;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

/* About Section */
.about-section {
  background: rgba(245, 245, 245, 0.85);
  color: var(--text-dark);
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.about-container {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.bio-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bio-paragraph {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

/* Research Section */
.research-section {
  background: linear-gradient(135deg, rgba(110, 110, 110, 0.85) 0%, rgba(80, 80, 80, 0.85) 100%);
  color: var(--text-light);
}

.research-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.research-section .section-title {
  color: var(--text-light);
}

.research-section .section-title::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
}

.research-subsection {
  animation: fadeInUp 0.8s ease-out;
}

.research-subsection h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-light);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
}

.interests-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interests-list li {
  padding-left: 30px;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
  color: #555;
}

.research-section .interests-list li {
  color: rgba(255, 255, 255, 0.9);
}

.interests-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.research-section .interests-list li::before {
  color: rgba(255, 255, 255, 0.8);
}

.functions-list,
.awards-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.function-item,
.award-item {
  padding: 15px;
  background: #f9f9f9;
  border-left: 3px solid var(--primary-color);
  border-radius: 4px;
  transition: all var(--transition-duration) ease;
}

.research-section .function-item,
.research-section .award-item {
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
}

.function-item:hover,
.award-item:hover {
  background: #f0f7ff;
  transform: translateX(5px);
}

.research-section .function-item:hover,
.research-section .award-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.function-item strong,
.award-item strong {
  color: var(--primary-color);
  font-size: 16px;
}

.research-section .function-item strong,
.research-section .award-item strong {
  color: rgba(255, 255, 255, 0.95);
}

.function-item p {
  margin: 8px 0;
  font-size: 15px;
  color: #666;
}

.research-section .function-item p {
  color: rgba(255, 255, 255, 0.85);
}

.function-item small,
.award-item small {
  display: block;
  color: #999;
  font-size: 13px;
  margin-top: 5px;
}

.research-section .function-item small,
.research-section .award-item small {
  color: rgba(255, 255, 255, 0.7);
}

.research-section a {
  color: #fff;
  text-decoration: underline;
}

.research-section a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.lecturing-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lecture-item {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  transition: all var(--transition-duration) ease;
}

.research-section .lecture-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.lecture-item strong {
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
}

.lecture-item p {
  margin: 8px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.lecture-item small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 5px;
}

.period-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.period-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-duration) ease;
}

.lecture-item:hover .period-tag {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.publications-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.publication-item {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  transition: all var(--transition-duration) ease;
}

.publication-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.publication-item strong {
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
}

.publication-item strong a {
  color: #fff;
  text-decoration: underline;
}

.publication-item strong a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.publication-item p {
  margin: 8px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.thesis-item {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  transition: all var(--transition-duration) ease;
}

.thesis-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.thesis-item p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.thesis-link {
  color: #fff;
  text-decoration: underline;
}

.thesis-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.theses-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.thesis-item-list {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  transition: all var(--transition-duration) ease;
}

.thesis-item-list:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.thesis-item-list strong {
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
}

.thesis-item-list strong a {
  color: #fff;
  text-decoration: underline;
}

.thesis-item-list strong a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.thesis-item-list p {
  margin: 8px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.thesis-item-list small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 5px;
}

.research-subsection h3 a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition-duration) ease;
}

.research-subsection h3 a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.collapsible-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: color var(--transition-duration) ease;
}

.collapsible-header:hover {
  color: rgba(255, 255, 255, 0.9);
}

.collapsible-header a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition-duration) ease;
}

.collapsible-header a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.thesis-count {
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  font-weight: 600;
}

.collapse-icon {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  width: 14px;
  transition: color var(--transition-duration) ease;
}

.collapsible-header:hover .collapse-icon {
  color: rgba(255, 255, 255, 0.9);
}

/* Games Section */
.games-section {
  background: rgba(245, 245, 245, 0.85);
  color: var(--text-dark);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.game-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--text-dark);
  animation: scaleIn 0.5s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding-top: 12px;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #ddd;
}

.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
  transform: scale(1.05);
}

.game-card > * {
  padding: 0 20px;
}

.game-title {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--primary-color);
}

.game-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.game-link {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 0;
}

.game-link:hover {
  background: var(--accent-color);
  color: white;
}

.game-jam {
  font-size: 13px;
  color: #999;
  margin: 15px 0 0;
  padding-bottom: 20px;
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, rgba(110, 110, 110, 0.85) 0%, rgba(80, 80, 80, 0.85) 100%);
  color: var(--text-light);
}

.contact-section .section-title {
  color: var(--text-light);
}

.contact-section .section-title::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-block {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.contact-section .contact-block {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid rgba(255, 255, 255, 0.6);
}

.contact-block:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-section .contact-block:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.contact-block h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.contact-section .contact-block h3 {
  color: rgba(255, 255, 255, 0.95);
}

.contact-block p {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
}

.contact-section .contact-block p {
  color: rgba(255, 255, 255, 0.85);
}

.contact-section a {
  color: #fff;
  text-decoration: underline;
}

.contact-section a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.contact-map {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-map iframe {
  width: 100%;
  height: 350px;
}

.contact-social {
  justify-content: center;
  margin-top: 30px;
}

.contact-social a {
  width: 60px;
  height: 60px;
}

/* Footer */
.app-footer {
  background: rgba(0, 0, 0, 0.1);
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  font-size: 14px;
  border-top: 1px solid var(--border-color);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
  .navbar-content {
    padding: 0 20px;
  }

  .navbar-menu {
    gap: 15px;
  }

  .nav-link {
    font-size: 12px;
  }

  .profile-name {
    font-size: 36px;
  }

  .profile-headline {
    font-size: 16px;
  }

  .section-title {
    font-size: 32px;
  }

  .page-section {
    padding: 40px 20px;
  }

  .section-content {
    width: 100%;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .contact-map iframe {
    height: 300px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .about-container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  :root {
    --navbar-height: 70px;
  }

  .navbar-content {
    flex-direction: column;
    padding: 10px 15px;
    gap: 10px;
  }

  .navbar-logo {
    font-size: 22px;
  }

  .navbar-menu {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 11px;
    padding: 3px 0;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .profile-name {
    font-size: 28px;
  }

  .profile-headline {
    font-size: 14px;
  }

  .profile-quote {
    font-size: 16px;
    padding: 15px;
  }

  .social-links {
    gap: 15px;
  }

  .social-links a {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-content {
    padding: 0 10px;
  }

  .contact-block {
    padding: 15px;
  }

  .contact-map iframe {
    height: 250px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .app-footer {
    display: none;
  }

  .page-section {
    page-break-after: always;
  }

  .scroll-container {
    overflow: visible;
  }
}
