/* Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

.custom-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Layout */
.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

.sidebar {
  flex: 0 0 240px;
  max-width: 300px;
  padding-right: 20px;
  border-right: 1px solid #ccc;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 20px;
}

.sidebar-info {
  text-align: center;
}

.sidebar-info h1 {
  font-size: 1.8em;
  margin: 0.5em 0 0.2em;
}

.role {
  text-align: center;
  font-size: 0.8em;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'Noto Sans KR', sans-serif;
}

.contact-links {
  list-style: none;
  padding-left: 5px;
  text-align: left;
}

.contact-links li {
  margin-bottom: 8px;
}

/* Content */
.content {
  flex: 1 1 600px;
  min-width: 0;
  padding-left: 20px;
}

.content ul {
  list-style: disc;
  padding-left: 30px;
  margin-bottom: 1em;
}

.content li {
  margin-bottom: 10px;
}

.date {
  float: right;
  font-style: italic;
}

.spaced {
  margin-bottom: 30px !important;
}

h2 {
  margin-top: 1.5em;
  font-size: 1.2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #666;
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background: #121212;
    color: #e0e0e0;
  }

  .sidebar {
    border-right: 1px solid #444;
  }

  .site-footer {
    border-top: 1px solid #444;
    color: #aaa;
  }

  a {
    color: #90caf9;
  }

  h2 {
    border-bottom: 1px solid #444;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .layout {
    gap: 16px;
    padding: 16px;
  }

  .sidebar {
    flex: 1 1 100%;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding-right: 0;
    border: none;
  }

  .avatar {
    width: 100px;
    margin: 0;
    flex: 0 0 auto;
  }

  .sidebar-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .sidebar-info h1,
  .sidebar-info .role,
  .contact-links {
    margin: 0 0 6px;
  }

  .contact-links {
    padding-left: 0;
    margin-top: 10px;
  }

  .contact-links li {
    margin-bottom: 6px;
  }

  .content {
    flex-basis: 100%;
    padding-left: 0;
  }
}