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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

:root {
  --luka-bg: #faf9f7;
  --luka-text: #3d3929;
  --luka-accent: #c2714f;
  --luka-secondary: #8c8577;
  --luka-border: rgba(194, 113, 79, 0.2);
  --luka-shadow: rgba(194, 113, 79, 0.15);
  --luka-social-bg: #ffffff;
  --luka-social-text: #8b7355;
  --luka-footer-border: rgba(194, 113, 79, 0.15);
  --luka-panel-bg: rgba(255, 255, 255, 0.64);
  --luka-panel-border: rgba(61, 57, 41, 0.12);
  --luka-soft-bg: rgba(96, 122, 112, 0.09);
  --luka-soft-text: #557067;
  --luka-link-bg: rgba(194, 113, 79, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --luka-bg: #1a1917;
    --luka-text: #d1cec7;
    --luka-accent: #e28a67;
    --luka-secondary: #9b9488;
    --luka-border: rgba(226, 138, 103, 0.2);
    --luka-shadow: rgba(0, 0, 0, 0.3);
    --luka-social-bg: #22211e;
    --luka-social-text: #d1cec7;
    --luka-footer-border: rgba(226, 138, 103, 0.15);
    --luka-panel-bg: rgba(34, 33, 30, 0.72);
    --luka-panel-border: rgba(209, 206, 199, 0.12);
    --luka-soft-bg: rgba(134, 158, 148, 0.14);
    --luka-soft-text: #a7b8b1;
    --luka-link-bg: rgba(226, 138, 103, 0.12);
  }
}

[data-theme="dark"] {
  --luka-bg: #1a1917;
  --luka-text: #d1cec7;
  --luka-accent: #e28a67;
  --luka-secondary: #9b9488;
  --luka-border: rgba(226, 138, 103, 0.2);
  --luka-shadow: rgba(0, 0, 0, 0.3);
  --luka-social-bg: #22211e;
  --luka-social-text: #d1cec7;
  --luka-footer-border: rgba(226, 138, 103, 0.15);
  --luka-panel-bg: rgba(34, 33, 30, 0.72);
  --luka-panel-border: rgba(209, 206, 199, 0.12);
  --luka-soft-bg: rgba(134, 158, 148, 0.14);
  --luka-soft-text: #a7b8b1;
  --luka-link-bg: rgba(226, 138, 103, 0.12);
}

[data-theme="light"] {
  --luka-bg: #faf9f7;
  --luka-text: #3d3929;
  --luka-accent: #c2714f;
  --luka-secondary: #8c8577;
  --luka-border: rgba(194, 113, 79, 0.2);
  --luka-shadow: rgba(194, 113, 79, 0.15);
  --luka-social-bg: #ffffff;
  --luka-social-text: #8b7355;
  --luka-footer-border: rgba(194, 113, 79, 0.15);
  --luka-panel-bg: rgba(255, 255, 255, 0.64);
  --luka-panel-border: rgba(61, 57, 41, 0.12);
  --luka-soft-bg: rgba(96, 122, 112, 0.09);
  --luka-soft-text: #557067;
  --luka-link-bg: rgba(194, 113, 79, 0.1);
}

body.theme-luka {
  background: var(--luka-bg);
  color: var(--luka-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-luka a {
  color: var(--luka-accent);
  text-decoration: none;
}

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

body.theme-luka .top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--luka-bg);
  border-bottom: 1px solid var(--luka-footer-border);
  z-index: 1000;
}

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

body.theme-luka .nav-left a {
  color: var(--luka-text);
  font-size: 18px;
  font-weight: 600;
}

body.theme-luka .nav-left {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

body.theme-luka .nav-brand {
  white-space: nowrap;
}

body.theme-luka .nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

body.theme-luka .nav-links a {
  color: var(--luka-secondary);
  font-size: 13px;
  font-weight: 500;
}

body.theme-luka .nav-links a:hover {
  color: var(--luka-accent);
}

body.theme-luka .theme-toggle {
  border: none;
  background: transparent;
  color: var(--luka-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-luka .theme-toggle:hover {
  background: var(--luka-border);
  color: var(--luka-accent);
}

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

body.theme-luka .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-luka .profile-card {
  width: 100%;
  padding: 0 20px;
  text-align: center;
}

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

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

body.theme-luka .site-name {
  margin: 0 0 8px;
  color: var(--luka-text);
  font-size: 28px;
  line-height: 1.2;
}

body.theme-luka .site-email {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 24px;
  color: var(--luka-secondary);
  font-size: 13px;
  font-family: "Ubuntu Mono", "SFMono-Regular", monospace;
  word-break: break-all;
}

body.theme-luka .site-role,
body.theme-luka .site-affiliation,
body.theme-luka .site-tagline {
  margin: 0 auto 8px;
  max-width: 250px;
  color: var(--luka-secondary);
  font-size: 14px;
  line-height: 1.55;
}

body.theme-luka .site-role {
  color: var(--luka-text);
  max-width: 280px;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.35;
}

body.theme-luka .site-affiliation {
  color: var(--luka-accent);
  font-weight: 500;
}

body.theme-luka .site-tagline {
  margin-bottom: 16px;
}

body.theme-luka .cv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 38px;
  margin: 0 0 18px;
  padding: 0 18px;
  border: 1px solid var(--luka-border);
  border-radius: 999px;
  background: var(--luka-panel-bg);
  color: var(--luka-text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(61, 57, 41, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.theme-luka .cv-button:hover {
  border-color: var(--luka-accent);
  color: var(--luka-accent);
  transform: translateY(-1px);
}

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

body.theme-luka .social-icons a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--luka-social-bg);
  color: var(--luka-social-text) !important;
  box-shadow: 0 2px 8px rgba(61, 57, 41, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

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

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

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

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

body.theme-luka .profile-note {
  width: 250px;
  margin: 34px auto 0;
  padding: 15px 16px;
  border: 1px solid var(--luka-panel-border);
  border-radius: 8px;
  background: var(--luka-panel-bg);
  color: var(--luka-secondary);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

body.theme-luka .profile-note-status {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 270px;
  border-left: 3px solid var(--luka-accent);
  background: var(--luka-panel-bg);
  text-align: center;
}

body.theme-luka .profile-note-status strong {
  display: block;
  color: var(--luka-text);
  font-size: 14px;
  line-height: 1.38;
  font-weight: 600;
}

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

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

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

body.theme-luka .section-title {
  display: inline-block;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--luka-accent);
  color: var(--luka-accent);
  font-size: 19px;
  font-weight: 600;
}

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

body.theme-luka .news-list,
body.theme-luka .compact-publications {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

body.theme-luka .news-list li {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  margin: 0;
  padding: 12px 0 12px 22px;
  color: var(--luka-text);
  font-size: 14px;
  line-height: 1.65;
}

body.theme-luka .news-list li + li {
  border-top: 1px solid var(--luka-panel-border);
}

body.theme-luka .news-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--luka-accent);
  box-shadow: 0 0 0 4px var(--luka-link-bg);
}

body.theme-luka .news-list span {
  display: block;
  color: var(--luka-accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  white-space: nowrap;
}

body.theme-luka .compact-publications li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 22px;
  color: var(--luka-text);
  font-size: 14px;
}

body.theme-luka .compact-publications li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.76em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--luka-accent);
}

body.theme-luka .interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.theme-luka .interest-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--luka-panel-border);
  border-radius: 999px;
  background: var(--luka-soft-bg);
  color: var(--luka-soft-text);
  font-size: 13px;
  font-weight: 500;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

body.theme-luka .research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

body.theme-luka .research-card {
  padding: 22px;
  border: 1px solid var(--luka-panel-border);
  border-radius: 8px;
  background: var(--luka-panel-bg);
  box-shadow: 0 8px 28px rgba(61, 57, 41, 0.06);
}

body.theme-luka .research-figure {
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid var(--luka-panel-border);
  border-radius: 8px;
  background: var(--luka-soft-bg);
}

body.theme-luka .research-media-link {
  display: block;
  aspect-ratio: 16 / 9;
  background: #fff;
}

body.theme-luka .research-media,
body.theme-luka .research-figure img,
body.theme-luka .research-figure video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.theme-luka .research-figure video {
  background: #111;
}

body.theme-luka .research-media-link-diagram {
  background: #fff;
}

body.theme-luka .research-figure .research-media-diagram {
  padding: 8px;
  object-fit: contain;
}

body.theme-luka .research-figure figcaption {
  padding: 8px 11px;
  color: var(--luka-secondary);
  font-size: 12px;
  line-height: 1.45;
  background: var(--luka-panel-bg);
}

body.theme-luka .research-card h3 {
  margin: 0 0 8px;
  color: var(--luka-text);
  font-size: 17px;
  line-height: 1.35;
}

body.theme-luka .research-summary {
  margin-bottom: 10px;
  color: var(--luka-text);
  font-size: 14px;
  line-height: 1.68;
}

body.theme-luka .research-authors {
  color: var(--luka-secondary);
  font-size: 13px;
  line-height: 1.55;
}

body.theme-luka .research-venue {
  margin-bottom: 8px;
  color: var(--luka-accent);
  font-size: 13px;
  font-weight: 600;
}

body.theme-luka .research-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body.theme-luka .research-links a,
body.theme-luka .contact-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--luka-border);
  border-radius: 999px;
  background: var(--luka-link-bg);
  color: var(--luka-accent);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

body.theme-luka .research-links a:hover,
body.theme-luka .contact-list a:hover {
  border-color: var(--luka-accent);
  background: transparent;
  transform: translateY(-1px);
}

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

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

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

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

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

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

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

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

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

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

body.theme-luka .compact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.theme-luka .compact-item {
  position: relative;
  padding-bottom: 14px;
  padding-left: 15px;
  border-bottom: 1px solid var(--luka-panel-border);
}

body.theme-luka .compact-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 3px;
  height: calc(100% - 24px);
  min-height: 28px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--luka-accent), rgba(194, 113, 79, 0.12));
}

body.theme-luka .compact-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

body.theme-luka .compact-item p {
  margin-bottom: 5px;
  color: var(--luka-secondary);
  font-size: 14px;
}

body.theme-luka .compact-item p:first-child {
  color: var(--luka-text);
}

body.theme-luka .compact-item span {
  color: var(--luka-accent);
  font-size: 13px;
  font-weight: 500;
}

body.theme-luka .contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.theme-luka .contact-list a {
  gap: 7px;
}

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

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

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

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

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

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

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

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

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

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

@media (max-width: 640px) {
  body.theme-luka .nav-links {
    display: none;
  }

  body.theme-luka .image.avatar img {
    width: 148px;
    height: 148px;
  }

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

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

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

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

  body.theme-luka .profile-note {
    width: 100%;
    max-width: 300px;
  }

  body.theme-luka .research-card {
    padding: 18px 16px;
  }

  body.theme-luka .research-figure img,
  body.theme-luka .research-figure video {
    height: 100%;
  }

  body.theme-luka .research-media-link {
    aspect-ratio: 4 / 3;
  }
}

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

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

  body.theme-luka .project-card,
  body.theme-luka .exp-detail,
  body.theme-luka .award-text,
  body.theme-luka .pub-content .author,
  body.theme-luka .pub-content .periodical,
  body.theme-luka .research-summary,
  body.theme-luka .research-authors,
  body.theme-luka .compact-item p {
    font-size: 13px;
  }

  body.theme-luka .news-list span {
    display: block;
    min-width: 0;
    margin-bottom: 2px;
  }

  body.theme-luka .news-list li {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 0 10px 18px;
  }

  body.theme-luka .news-list li::before {
    top: 19px;
  }
}
