/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --theme-color: #B509AC;
  --hover-color: #f648ed;
  --border-color: #e8e8e8;
  --muted-color: #828282;
  --icon-color: #424242;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--bg-color);
}

p {
  color: var(--text-color);
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  line-height: 1.25;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: var(--text-color);
}

a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--theme-color);
  text-decoration: none;
}

img {
  max-width: 100%;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 50px;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
  opacity: 0.95;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
}

.site-nav {
  float: right;
  line-height: 56px;
}

.site-nav .page-link {
  line-height: 1.5;
  color: var(--text-light);
  margin-left: 15px;
  font-size: 1rem;
}

.site-nav .page-link:hover {
  color: var(--theme-color);
}

/* ==========================================================================
   Page Content
   ========================================================================== */
.page-content {
  padding-top: 100px;
}

/* ==========================================================================
   About / Profile
   ========================================================================== */
.post-header {
  margin-bottom: 40px;
}

.post-title {
  font-size: 2.5rem;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 10px;
  margin-top: 0;
  font-weight: 400;
  color: var(--text-color);
}

.profile {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  width: 40%;
}

.profile img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 0 5px var(--muted-color);
}

.profile .placeholder-avatar {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--theme-color) 0%, #7b2ff2 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
  font-weight: 300;
  box-shadow: 0 0 5px var(--muted-color);
}

.post-content a {
  color: var(--theme-color);
  font-weight: 400;
}

.post-content a:hover {
  text-decoration: underline;
}

.about-icons {
  font-size: 2.4rem;
  margin-top: 0.5rem;
  clear: both;
}

.about-icons a {
  color: var(--icon-color);
  margin-right: 10px;
  transition: color 0.2s ease;
}

.about-icons a:hover {
  color: var(--theme-color);
  text-decoration: none;
}

/* ==========================================================================
   Publications
   ========================================================================== */
.publications {
  margin-top: 2rem;
}

.publications .section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 30px;
}

.year {
  border-top: 1px solid #ccc;
  color: #ccc;
  margin: 0 -3em -2.5ex -2em;
  padding-top: 1ex;
  text-align: right;
  font-weight: 300;
}

.bibliography {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 50px;
}

.bibliography li {
  margin-bottom: 1.5rem;
}

.pub-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.pub-img {
  flex: 0 0 280px;
  max-width: 280px;
}

.pub-img img {
  width: 100%;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.pub-img .pub-img-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  border-radius: 3px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.75rem;
}

.pub-text {
  flex: 1;
}

.pub-text .title {
  font-weight: bold;
  display: block;
  color: var(--text-color);
  margin-bottom: 4px;
}

.pub-text .author {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.pub-text .author a {
  color: var(--theme-color);
  border-bottom: 1px dashed var(--theme-color);
}

.pub-text .author a:hover {
  border-bottom-style: solid;
  text-decoration: none;
}

.pub-text .author .me {
  border-bottom: 1px solid var(--text-color);
  font-style: normal;
  font-weight: 400;
}

.pub-text .venue {
  color: var(--text-light);
  font-style: italic;
  font-weight: bold;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 6px;
}

.pub-text .links a.btn {
  display: inline-block;
  color: var(--text-color);
  border: 1px solid var(--text-color);
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-right: 4px;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.pub-text .links a.btn:hover {
  color: var(--theme-color);
  border-color: var(--theme-color);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-section {
  margin-top: 2rem;
}

.projects-section .section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 30px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 50px;
}

.project-card {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.project-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.project-card .project-img-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 0.75rem;
}

.project-card .project-info {
  padding: 12px;
}

.project-card .project-info h4 {
  margin: 0 0 6px 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
}

.project-card .project-info p {
  margin: 0 0 8px 0;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

.project-card .project-info .links a.btn {
  display: inline-block;
  color: var(--text-color);
  border: 1px solid var(--text-color);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 4px;
  transition: all 0.2s ease;
}

.project-card .project-info .links a.btn:hover {
  color: var(--theme-color);
  border-color: var(--theme-color);
}

/* ==========================================================================
   Contact / Social
   ========================================================================== */
.social {
  border-top: 1px solid var(--border-color);
  margin-top: 50px;
  padding-top: 20px;
  text-align: center;
}

.social h2 {
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
}

.contacticon {
  display: block;
  font-size: 3.5rem;
  margin: 10px;
}

.contacticon a {
  color: var(--icon-color);
  margin: 0 8px;
  transition: color 0.2s ease;
}

.contacticon a:hover {
  color: var(--theme-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 40px;
  padding: 15px 0;
  font-size: 0.75rem;
  color: var(--muted-color);
}

.site-footer a {
  color: var(--muted-color);
}

.site-footer a:hover {
  color: var(--theme-color);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 600px) {
  .wrapper {
    padding: 0 20px;
  }

  .profile {
    float: none;
    width: 50%;
    margin: 0 auto 1.5rem auto;
    display: block;
  }

  .post-title {
    font-size: 1.8rem;
  }

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

  .pub-img {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .site-nav {
    float: none;
    text-align: center;
  }

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

@media screen and (min-width: 48em) {
  html {
    font-size: 18px;
  }
}

@media screen and (min-width: 64em) {
  html {
    font-size: 20px;
  }
}
