/* mkensari.com — ronghanghu-inspired academic CV */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  line-height: 1.6;
}

body {
  margin: 0;
  color: #1a1a1a;
  background: #1a1a1a;
}

a {
  color: #0073aa;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

.site-wrap {
  background: #fff;
  padding: 40px;
  box-sizing: border-box;
}

@media screen and (min-width: 44.375em) {
  .site-wrap {
    margin: 21px;
  }
}

.site-inner {
  padding: 0 7.6923%;
}

.site-header {
  padding: 2em 0 1em;
  border-bottom: 1px solid #eee;
}

.site-header-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-description {
  margin: 0.35em 0 0;
  color: #686868;
  font-size: 1rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation a {
  color: #1a1a1a;
  font-size: 1rem;
  text-decoration: none;
}

.main-navigation .current a {
  font-weight: 700;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switcher button {
  border: 1px solid #ccc;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.2em 0.55em;
  cursor: pointer;
  border-radius: 3px;
}

.lang-switcher button:hover {
  border-color: #0073aa;
  color: #0073aa;
}

.lang-switcher button.is-active {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.site-content {
  padding: 1.5em 0 2.5em;
}

.content-area {
  margin: 0 auto;
}

.entry-content {
  margin-left: 15%;
  margin-right: 15%;
  width: 70%;
}

.entry-title {
  margin: 0 0 0.6em;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.intro-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25em;
}

.intro-text {
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
}

.intro-text p {
  margin: 0 0 0.4em;
}

.profile-photo {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8edf2;
}

.social-links {
  margin: 0;
  font-size: 1.05rem;
}

.section-heading {
  margin: 1.5em 0 0.75em;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}

.category-heading {
  margin: 1.25em 0 0.5em;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: #444;
}

.entry-content ul {
  margin: 0 0 1em;
  padding-left: 1.5em;
  font-size: 1.05rem;
}

.entry-content li {
  margin-bottom: 0.65em;
}

.entry-content hr {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid #ddd;
}

.projects-section .section-heading {
  margin-top: 2em;
}

/* Academic project blocks — left copy, right image */
.project-item {
  margin: 0;
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.project-copy {
  min-width: 0;
}

.project-title {
  margin: 0 0 0.4em;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.project-meta {
  margin: 0 0 0.6em;
  font-size: 0.98rem;
  line-height: 1.5;
}

.project-tags {
  color: #686868;
  font-style: italic;
}

.project-desc {
  margin: 0;
  padding-left: 1.25em;
  font-size: 1.02rem;
  line-height: 1.55;
}

.project-desc li {
  margin: 0;
}

.project-media {
  justify-self: end;
}

.project-gallery {
  position: relative;
  width: 250px;
}

.project-gallery .project-thumb {
  width: 100%;
}

.gallery-badge {
  position: absolute;
  bottom: 0.45rem;
  left: 0.45rem;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-dot.is-active {
  background: #555;
  transform: scale(1.15);
}

.project-thumb {
  display: block;
  width: 250px;
  height: 169px;
  object-fit: cover;
  border-radius: 2px;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.project-thumb:hover {
  opacity: 0.88;
}

.site-footer {
  margin-left: 15%;
  margin-right: 15%;
  width: 70%;
  padding: 1.25em 0 0;
  border-top: 1px solid #eee;
  color: #686868;
  font-size: 0.95rem;
  text-align: center;
}

html[dir="rtl"] .entry-content ul {
  padding-right: 1.5em;
  padding-left: 0;
}

html[dir="rtl"] .project-body {
  direction: rtl;
}

html[dir="rtl"] .project-desc {
  padding-right: 1.25em;
  padding-left: 0;
}

html[dir="rtl"] .intro-row {
  flex-direction: row-reverse;
}

@media (max-width: 910px) {
  .entry-content,
  .site-footer {
    margin-left: 8%;
    margin-right: 8%;
    width: 84%;
  }
}

@media (max-width: 710px) {
  html {
    font-size: 16px;
  }

  .site-wrap {
    margin: 0;
    padding: 24px 16px;
  }

  .site-inner {
    padding: 0 3%;
  }

  .entry-content,
  .site-footer {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .intro-row {
    flex-direction: column;
  }

  .profile-photo {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 1em;
  }

  html[dir="rtl"] .intro-row {
    flex-direction: column;
  }

  .project-body {
    grid-template-columns: 1fr;
  }

  .project-media {
    justify-self: center;
    order: -1;
  }

  .project-gallery {
    width: 100%;
    max-width: 250px;
  }

  .project-thumb {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 250 / 169;
  }

  .entry-title {
    font-size: 1.65rem;
    text-align: center;
  }
}
