/* ============================================
   Hopotta Homepage
   Warm minimal academic homepage template
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

body.theme-hopotta,
body.theme-hopotta *,
body.theme-hopotta *::before,
body.theme-hopotta *::after {
  box-sizing: border-box;
}

:root {
  --hopotta-bg: #faf9f7;
  --hopotta-text: #3d3929;
  --hopotta-accent: #c2714f;
  --hopotta-secondary: #8c8577;
  --hopotta-border: rgba(194, 113, 79, 0.2);
  --hopotta-shadow: rgba(194, 113, 79, 0.15);
  --hopotta-social-bg: #ffffff;
  --hopotta-social-text: #8b7355;
  --hopotta-footer-border: rgba(194, 113, 79, 0.15);
  --hopotta-glass-bg: rgba(250, 249, 247, 0.75);
  --hopotta-glass-highlight: rgba(255, 255, 255, 0.8);
}
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hopotta-bg: #1a1917;
    --hopotta-text: #d1cec7;
    --hopotta-accent: #e28a67;
    --hopotta-secondary: #9b9488;
    --hopotta-border: rgba(226, 138, 103, 0.2);
    --hopotta-shadow: rgba(0, 0, 0, 0.3);
    --hopotta-social-bg: #22211e;
    --hopotta-social-text: #d1cec7;
    --hopotta-footer-border: rgba(226, 138, 103, 0.15);
    --hopotta-glass-bg: rgba(26, 25, 23, 0.70);
    --hopotta-glass-highlight: rgba(255, 255, 255, 0.1);
  }
}

[data-theme="dark"] {
  --hopotta-bg: #1a1917;
  --hopotta-text: #d1cec7;
  --hopotta-accent: #e28a67;
  --hopotta-secondary: #9b9488;
  --hopotta-border: rgba(226, 138, 103, 0.2);
  --hopotta-shadow: rgba(0, 0, 0, 0.3);
  --hopotta-social-bg: #22211e;
  --hopotta-social-text: #d1cec7;
  --hopotta-footer-border: rgba(226, 138, 103, 0.15);
  --hopotta-glass-bg: rgba(26, 25, 23, 0.70);
  --hopotta-glass-highlight: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
  --hopotta-bg: #faf9f7;
  --hopotta-text: #3d3929;
  --hopotta-accent: #c2714f;
  --hopotta-secondary: #8c8577;
  --hopotta-border: rgba(194, 113, 79, 0.2);
  --hopotta-shadow: rgba(194, 113, 79, 0.15);
  --hopotta-social-bg: #ffffff;
  --hopotta-social-text: #8b7355;
  --hopotta-footer-border: rgba(194, 113, 79, 0.15);
  --hopotta-glass-bg: rgba(250, 249, 247, 0.75);
  --hopotta-glass-highlight: rgba(255, 255, 255, 0.8);
}

body.theme-hopotta {
  background: var(--hopotta-bg);
  color: var(--hopotta-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.theme-hopotta a {
  color: var(--hopotta-accent);
  text-decoration: none;
}

body.theme-hopotta a:hover {
  filter: brightness(1.15);
}

body.theme-hopotta .top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--hopotta-glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    inset 0 1px 0 0 var(--hopotta-glass-highlight),
    0 1px 0 0 var(--hopotta-footer-border);
  z-index: 1000;
  transition: background-color 0.3s ease;
}

body.theme-hopotta .nav-container {
  width: 100%;
  max-width: 1120px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.theme-hopotta .nav-left a {
  color: var(--hopotta-text);
  font-size: 22px;
  font-weight: 600;
  font-family: "Playfair Display", Georgia, serif;
}

body.theme-hopotta .theme-toggle {
  border: none;
  background: transparent;
  color: var(--hopotta-text);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.theme-hopotta .theme-toggle:hover {
  background: var(--hopotta-border);
  color: var(--hopotta-accent);
}

body.theme-hopotta .wrapper {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  min-height: 100vh;
}

body.theme-hopotta .sidebar {
  width: 320px;
  flex-shrink: 0;
  position: fixed;
  top: 60px;
  left: calc(50% - 560px);
  height: calc(100vh - 60px);
  overflow-y: auto;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 60px;
  z-index: 100;
}

body.theme-hopotta .profile-card {
  width: 100%;
  padding: 0 20px;
  text-align: center;
}

body.theme-hopotta .image.avatar {
  display: block;
  margin: 0 auto 28px;
}

body.theme-hopotta .image.avatar img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 24px var(--hopotta-shadow);
}

body.theme-hopotta .site-name {
  margin: 0 0 8px;
  color: var(--hopotta-text);
  font-size: 28px;
  line-height: 1.2;
  font-family: "Playfair Display", Georgia, serif;
}

body.theme-hopotta .site-tagline {
  margin: 0 0 24px;
  color: var(--hopotta-secondary);
  font-size: 15px;
  font-family: "Lora", Georgia, serif;
  font-style: italic;
}

body.theme-hopotta .social-icons {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

body.theme-hopotta .social-icons a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--hopotta-social-text) !important;
  transition: transform 0.2s ease, color 0.2s ease;
  font-size: 19px;
}

body.theme-hopotta .social-icons a:hover {
  color: var(--hopotta-accent) !important;
  transform: translateY(-2px);
}

body.theme-hopotta .visitor-card {
  margin: 40px auto 0;
  width: 240px;
  padding: 18px 16px;
  border: 1px dashed var(--hopotta-border);
  border-radius: 14px;
  color: var(--hopotta-secondary);
  text-align: left;
}

body.theme-hopotta .visitor-card-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hopotta-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.theme-hopotta .visitor-card-body {
  font-size: 13px;
  line-height: 1.6;
}

body.theme-hopotta .content {
  flex: 1;
  min-width: 0;
  margin-left: 320px;
  padding: 120px 40px 80px 60px;
}

body.theme-hopotta .section {
  margin-bottom: 44px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.theme-hopotta .section.visible {
  opacity: 1;
  transform: translateY(0);
}

body.theme-hopotta .section-title {
  display: inline-block;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hopotta-accent);
  color: var(--hopotta-accent);
  font-size: 19px;
  font-weight: 700;
  font-family: "Playfair Display", Georgia, serif;
}

body.theme-hopotta .section-body p {
  margin: 0 0 14px;
}

body.theme-hopotta .card {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.theme-hopotta .timeline-item {
  position: relative;
  margin-left: 20px;
  padding-left: 8px;
  padding-bottom: 20px;
}

body.theme-hopotta .timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--hopotta-accent), rgba(194, 113, 79, 0.12));
}

body.theme-hopotta .timeline-item:last-child::before {
  bottom: 50%;
}

body.theme-hopotta .timeline-item::after {
  content: "";
  position: absolute;
  left: -25px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hopotta-accent);
  border: 2px solid var(--hopotta-bg);
}

body.theme-hopotta .experience-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

body.theme-hopotta .institution-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

body.theme-hopotta .experience-content {
  flex: 1;
}

body.theme-hopotta .experience-content p {
  margin: 0 0 2px;
}

body.theme-hopotta .exp-title {
  font-size: 15px;
  color: var(--hopotta-text);
}

body.theme-hopotta .exp-detail {
  font-size: 14px;
  color: var(--hopotta-secondary);
}

body.theme-hopotta .exp-period {
  font-size: 13px;
  color: var(--hopotta-accent);
  font-weight: 500;
}

body.theme-hopotta .project-card {
  font-size: 15px;
  line-height: 1.7;
}

body.theme-hopotta .publications ol.bibliography {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.theme-hopotta .publications ol.bibliography li {
  margin-bottom: 14px;
  padding: 15px 0 15px 16px;
  border-left: 3px solid var(--hopotta-accent);
}

body.theme-hopotta .pub-content .title {
  margin-bottom: 4px;
  color: var(--hopotta-text);
  font-size: 15px;
  font-weight: 600;
}

body.theme-hopotta .pub-content .author {
  margin-bottom: 4px;
  color: var(--hopotta-secondary);
  font-size: 14px;
}

body.theme-hopotta .pub-content .periodical {
  margin-bottom: 6px;
  color: var(--hopotta-accent);
  font-size: 14px;
}

body.theme-hopotta .pub-content .links a {
  font-size: 13px;
  font-weight: 500;
}

body.theme-hopotta .awards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.theme-hopotta .award-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

body.theme-hopotta .award-icon {
  flex-shrink: 0;
  font-size: 20px;
}

body.theme-hopotta .award-text {
  color: var(--hopotta-text);
  font-size: 14px;
}

/* Skills Grid */
body.theme-hopotta .skills-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.theme-hopotta .skill-category h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--hopotta-text);
  font-weight: 600;
}

body.theme-hopotta .skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.theme-hopotta .tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--hopotta-social-bg);
  border: 1px solid var(--hopotta-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--hopotta-text);
  transition: all 0.2s ease;
}

body.theme-hopotta .tag:hover {
  background: var(--hopotta-accent);
  color: #fff;
  border-color: var(--hopotta-accent);
}

/* Research Interests */
body.theme-hopotta .interests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.theme-hopotta .interest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

body.theme-hopotta .interest-icon {
  font-size: 20px;
  flex-shrink: 0;
}

body.theme-hopotta .interest-text {
  font-size: 15px;
  color: var(--hopotta-text);
}

body.theme-hopotta .site-footer {
  width: 100%;
  flex-basis: 100%;
  padding: 32px 24px 40px 380px;
  text-align: center;
}

body.theme-hopotta .site-footer p {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--hopotta-footer-border);
  color: var(--hopotta-secondary);
  font-size: 13px;
}

body.theme-hopotta .template-credit {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}

body.theme-hopotta h1,
body.theme-hopotta h2,
body.theme-hopotta h3,
body.theme-hopotta h4,
body.theme-hopotta strong {
  color: var(--hopotta-text);
}

@media (max-width: 1080px) {
  body.theme-hopotta .nav-container {
    padding: 0 20px;
  }

  body.theme-hopotta .wrapper {
    flex-direction: column;
    padding: 0 20px;
  }

  body.theme-hopotta .sidebar {
    position: static;
    left: auto;
    width: 100%;
    height: auto;
    padding-top: 80px;
    overflow: visible;
  }

  body.theme-hopotta .profile-card {
    padding: 0;
  }

  body.theme-hopotta .content {
    margin-left: 0;
    padding: 32px 0 48px;
  }

  body.theme-hopotta .site-footer {
    padding: 32px 0;
  }

  body.theme-hopotta .site-footer p {
    padding-top: 0;
    border-top: none;
  }
}

@media (max-width: 640px) {
  body.theme-hopotta .image.avatar img {
    width: 148px;
    height: 148px;
  }

  body.theme-hopotta .site-name {
    font-size: 24px;
  }

  body.theme-hopotta .experience-item {
    gap: 12px;
  }

  body.theme-hopotta .institution-logo {
    width: 44px;
    height: 44px;
  }

  body.theme-hopotta .visitor-card {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  body.theme-hopotta .section {
    margin-bottom: 32px;
  }

  body.theme-hopotta .section-title {
    font-size: 18px;
  }

  body.theme-hopotta .project-card,
  body.theme-hopotta .exp-detail,
  body.theme-hopotta .award-text,
  body.theme-hopotta .pub-content .author,
  body.theme-hopotta .pub-content .periodical {
    font-size: 13px;
  }
}
