/*
 * Twitter-like styling for personal microblog
 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.container-full {
  max-width: 100%;
}

/* Navigation */
.navbar {
  border-bottom: 1px solid #2f3336;
  background-color: #000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: relative;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 7px;
  z-index: 101;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
}

.hamburger-menu span {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: #181818;
}

.button-link {
  background-color: #1d9bf0;
  color: #fff;
  border: none;
  cursor: pointer;
}

.button-link:hover {
  background-color: #1a8cd8;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin: 1rem 2rem;
  border-radius: 8px;
}

.alert-notice {
  background-color: #1d9bf0;
  color: #fff;
}

.alert-alert {
  background-color: #f4212e;
  color: #fff;
}

/* Main Content */
.main-content {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}

.main-content-full {
  max-width: 100%;
  padding: 2rem;
}

.timeline {
  flex: 0 1 600px;
  max-width: 600px;
  width: 100%;
}

.sidebar {
  width: 300px;
}

/* Post Form */
.post-form {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.post-form textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  resize: none;
  min-height: 100px;
  font-family: inherit;
}

.post-form textarea:focus {
  outline: none;
}

.post-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2f3336;
}

.post-form-actions label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.post-form-actions label svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.post-form-actions input[type="file"] {
  color: #1d9bf0;
  cursor: pointer;
}

.post-form-actions button {
  background-color: #1d9bf0;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.post-form-actions button:hover {
  background-color: #1a8cd8;
}

.post-form-actions button:disabled {
  background-color: #1d9bf0;
  opacity: 0.5;
  cursor: not-allowed;
}

.image-preview {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.image-preview-item {
  position: relative;
  width: auto;
  min-width: 100px;
  border-radius: 8px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.image-preview-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.image-preview-item .markdown-snippet {
  width: 100%;
  max-width: 400px;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.image-preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Post Card */
.post-card {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 0.75rem 1rem 0.5rem;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.post-card:hover {
  background-color: #1a1a1a;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  position: relative;
}

.post-menu-container {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

.post-menu-button {
  background: none;
  border: none;
  color: #71767b;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
}

.post-menu-button:hover {
  background-color: #1d9bf0;
  color: #fff;
}

.post-menu-icon {
  width: 20px;
  height: 20px;
}

.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: #000;
  border: 1px solid #2f3336;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  min-width: 180px;
  display: none;
  overflow: hidden;
  z-index: 100;
}

.post-menu-container.active .post-menu-dropdown {
  display: block;
}

.post-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s;
  font-family: inherit;
}

.post-menu-item:hover {
  background-color: #16181c;
}

.post-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.post-menu-item-danger {
  color: #f4212e;
}

.post-menu-item-danger:hover {
  background-color: rgba(244, 33, 46, 0.1);
}

.post-menu-item form {
  margin: 0;
  padding: 0;
  display: flex;
  width: 100%;
}

.post-menu-item form button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-weight: bold;
  color: #fff;
}

.post-author-handle {
  color: #71767b;
  font-size: 0.9rem;
}

.post-time {
  color: #71767b;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.post-content {
  color: #fff;
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.25;
}

.post-content p {
  margin: 0;
  padding: 0;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0;
  border-radius: 16px;
  overflow: hidden;
}

.post-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-actions {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2f3336;
}

.post-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #71767b;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.post-action svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.post-action:hover {
  color: #1d9bf0;
}

.post-action:hover svg {
  stroke: #1d9bf0;
}

/* Quote Tweet */
.quote-tweet {
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1rem;
  margin: 1rem 0;
  background-color: #000;
}

/* Inline Replies */
.post-replies {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2f3336;
}

.inline-reply {
  margin-top: 0.75rem;
  margin-left: 3rem;
  padding-left: 1rem;
  border-left: 2px solid #2f3336;
  position: relative;
}

.inline-reply .post-card {
  margin: 0;
  border: none;
  background-color: transparent;
  padding: 0.5rem 0;
}

.inline-reply .post-header {
  margin-bottom: 0.25rem;
}

.inline-reply .post-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.inline-reply .post-author-name {
  font-size: 0.9rem;
}

.inline-reply .post-author-handle {
  font-size: 0.85rem;
}

.inline-reply .post-content {
  font-size: 0.95rem;
  margin: 0.25rem 0;
}

.inline-reply .post-actions {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  gap: 1.5rem;
}

.inline-reply .post-action {
  font-size: 0.9rem;
}

.inline-reply .post-action svg {
  width: 16px;
  height: 16px;
}

/* Thread Indicator */
.thread-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem 3rem;
  padding-left: 1rem;
  color: #71767b;
  font-size: 0.9rem;
  position: relative;
}

.thread-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #2f3336;
}

.thread-text {
  padding-left: 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.thread-text:hover {
  color: #1d9bf0;
  text-decoration: underline;
}

/* Index Replies Container */
.post-container {
  margin-bottom: 1rem;
}

.index-replies-container {
  margin-top: 0.5rem;
  margin-left: 0;
}

.index-reply-wrapper {
  position: relative;
  margin-top: 0.75rem;
  padding-left: 3rem;
}

.reply-connector {
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #2f3336;
}

.reply-connector::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #2f3336;
}

/* Reply Context */
.reply-context {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #2f3336;
}

.reply-to-indicator {
  display: block;
  color: #71767b;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.reply-to-link {
  color: #1d9bf0;
  text-decoration: none;
}

.reply-to-link:hover {
  text-decoration: underline;
}

.context-post {
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid #2f3336;
}

/* Context Mode Post Styling */
.post-card-context {
  background-color: transparent;
  border: none;
  padding: 0.5rem 0;
  margin: 0;
}

.post-card-context .post-header {
  margin-bottom: 0.25rem;
}

.post-card-context .post-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.post-card-context .post-author-name {
  font-size: 0.9rem;
  color: #71767b;
}

.post-card-context .post-author-handle {
  font-size: 0.85rem;
  color: #71767b;
}

.post-content-context {
  font-size: 0.95rem;
  color: #71767b;
  margin: 0.25rem 0;
}

.post-card-context .post-images {
  margin-top: 0.5rem;
}

.post-card-context .post-images img {
  max-width: 200px;
  border-radius: 12px;
}

/* Profile */
.profile-header {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.profile-banner {
  width: 100%;
  height: 200px;
  background-color: #333;
  object-fit: cover;
}

.profile-info {
  padding: 1rem 2rem 2rem;
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #000;
  object-fit: cover;
  margin-top: -60px;
  background-color: #000;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1rem;
}

.profile-handle {
  color: #71767b;
  margin-bottom: 1rem;
}

.profile-bio {
  color: #fff;
  margin: 0;
  white-space: normal;
}

.profile-bio.markdown-content {
  margin: 0;
}

.profile-meta {
  display: flex;
  gap: 1rem;
  color: #71767b;
  margin-top: 1rem;
}

/* Reply Thread */
.reply-thread {
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 2px solid #2f3336;
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    width: 100%;
  }

  .hamburger-menu {
    display: flex;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 7px;
  }

  .nav-content {
    padding: 1rem;
  }

  .nav-logo span {
    font-size: 1.25rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #000;
    border-right: 1px solid #2f3336;
    flex-direction: column;
    align-items: flex-start;
    padding: 4rem 0 2rem;
    gap: 0;
    transition: left 0.3s ease;
    z-index: 100;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links .nav-link {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid #2f3336;
    display: block;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
  }

  .nav-links .nav-link:last-child {
    border-bottom: none;
  }

  .nav-links .button-link {
    width: 100%;
    text-align: left;
    padding: 1rem 2rem;
    border-radius: 0;
    display: block;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
  }

  .nav-links form {
    width: 100%;
  }

  .nav-links form .button-link {
    width: 100%;
  }

  /* Overlay when menu is open */
  /* Overlay when menu is open */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
    touch-action: none;
  }

  .nav-overlay.active {
    display: block;
  }

  .post-images {
    grid-template-columns: 1fr;
  }
}

/* Admin Panel */
.admin-container {
  width: 100%;
  max-width: 100%;
}

.admin-header {
  margin-bottom: 2rem;
}

.admin-users {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1.5rem;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
}

.admin-table thead {
  border-bottom: 2px solid #2f3336;
}

.admin-table th {
  text-align: left;
  padding: 1rem;
  font-weight: bold;
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #2f3336;
}

.admin-table tbody tr:hover {
  background-color: #1a1d21;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.admin-button-primary {
  background-color: #1d9bf0;
  color: #fff;
}

.admin-button-primary:hover {
  background-color: #1a8cd8;
}

.admin-button-danger {
  background-color: #f4212e;
  color: #fff;
}

.admin-button-danger:hover {
  background-color: #d91e2a;
}

/* Blog Posts */
.blog-post-card {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.blog-post-card:hover {
  background-color: #1a1a1a;
}

.blog-post-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  position: relative;
}

.blog-post-menu-container {
  position: relative;
  z-index: 10;
}

.blog-post-menu-button {
  background: none;
  border: none;
  color: #71767b;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
}

.blog-post-menu-button:hover {
  background-color: #1d9bf0;
  color: #fff;
}

.blog-post-menu-icon {
  width: 20px;
  height: 20px;
}

.blog-post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: #000;
  border: 1px solid #2f3336;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  min-width: 180px;
  display: none;
  overflow: hidden;
  z-index: 100;
}

.blog-post-menu-container.active .blog-post-menu-dropdown {
  display: block;
}

.blog-post-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s;
  font-family: inherit;
}

.blog-post-menu-item:hover {
  background-color: #16181c;
}

.blog-post-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.blog-post-menu-item-danger {
  color: #f4212e;
}

.blog-post-menu-item-danger:hover {
  background-color: #1a0f0f;
}

/* Articles */
.article-card {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.article-card:hover {
  background-color: #1a1a1a;
}

.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  position: relative;
}

.article-menu-container {
  position: relative;
  z-index: 10;
}

.article-menu-button {
  background: none;
  border: none;
  color: #71767b;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
}

.article-menu-button:hover {
  background-color: #1d9bf0;
  color: #fff;
}

.article-menu-icon {
  width: 20px;
  height: 20px;
}

.article-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: #000;
  border: 1px solid #2f3336;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  min-width: 180px;
  display: none;
  overflow: hidden;
  z-index: 100;
}

.article-menu-container.active .article-menu-dropdown {
  display: block;
}

.article-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s;
  font-family: inherit;
}

.article-menu-item:hover {
  background-color: #16181c;
}

.article-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.article-menu-item-danger {
  color: #f4212e;
}

.article-menu-item-danger:hover {
  background-color: #1a0f0f;
}

.article-full {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.article-form {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 2rem;
}

.article-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.file-preview {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.file-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.file-preview-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.file-preview-item > div {
  min-width: 200px;
}

.file-preview-item .markdown-snippet {
  width: 100%;
  max-width: 400px;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.file-preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  z-index: 1;
}

.file-preview-item button:hover {
  background-color: rgba(239, 68, 68, 0.9);
}

/* Markdown Content */
.markdown-content {
  color: #fff;
  line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  color: #fff;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

.markdown-content h1 {
  font-size: 2rem;
  border-bottom: 1px solid #2f3336;
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  font-size: 1.75rem;
}

.markdown-content h3 {
  font-size: 1.5rem;
}

.markdown-content h4 {
  font-size: 1.25rem;
}

.markdown-content p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.profile-section-content .markdown-content p {
  margin-bottom: 0.5rem;
}

.profile-section-content .markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  padding-left: 2rem;
}

.profile-section-content .markdown-content ul,
.profile-section-content .markdown-content ol {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.markdown-content li {
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

.markdown-content li:last-child {
  margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child {
  margin-top: 0;
}

.markdown-content code {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #1d9bf0;
}

.markdown-content pre {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-content pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  color: #fff;
}

.markdown-content blockquote {
  border-left: 4px solid #1d9bf0;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #71767b;
  font-style: italic;
}

.markdown-content a {
  color: #1d9bf0;
  text-decoration: none;
}

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

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #2f3336;
  padding: 0.5rem;
  text-align: left;
}

.markdown-content th {
  background-color: #16181c;
  font-weight: bold;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #2f3336;
  margin: 2rem 0;
}

/* LinkedIn-style Profile Sections */
.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.profile-section-card {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1.5rem;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2f3336;
}

.profile-section-header h2 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

.profile-section-content {
  color: #fff;
}

/* Experience Items */
.experience-item {
  padding: 1rem 0;
  border-bottom: 1px solid #2f3336;
}

.experience-item:last-child {
  border-bottom: none;
}

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

.experience-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.experience-description {
  line-height: 1.6;
}

/* Education Items */
.education-item {
  padding: 1rem 0;
  border-bottom: 1px solid #2f3336;
}

.education-item:last-child {
  border-bottom: none;
}

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

.education-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.education-description {
  line-height: 1.6;
}

/* Skills */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #1d9bf0;
  color: #fff;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-tag button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.skill-tag button:hover {
  opacity: 1;
}

/* Responsive adjustments for profile sections */
@media (max-width: 768px) {
  .experience-header,
  .education-header {
    flex-direction: column;
  }

  .experience-actions,
  .education-actions {
    margin-top: 0.5rem;
    width: 100%;
  }
}
