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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fdfdfd;
  margin: 0;
  padding: 0;
}

a {
  color: #2a7ae2;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  border-top: 5px solid #424242;
  border-bottom: 1px solid #e8e8e8;
  min-height: 56px;
  background-color: #fff;
  position: relative;
}

.site-title {
  font-size: 26px;
  font-weight: 300;
  line-height: 56px;
  letter-spacing: -1px;
  margin-bottom: 0;
  float: left;
  color: #424242;
}

.site-title:hover {
  text-decoration: none;
  color: #2a7ae2;
}

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

.site-nav .page-link {
  color: #424242;
  line-height: 1.5;
  margin-left: 20px;
}

.site-nav .page-link:hover {
  color: #2a7ae2;
}

/* Wrapper */
.wrapper {
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 30px;
  padding-left: 30px;
}

.wrapper::after {
  content: "";
  display: table;
  clear: both;
}

/* Main content */
.page-content {
  padding: 30px 0;
  min-height: calc(100vh - 200px);
}

.post {
  margin-bottom: 30px;
}

.post-content {
  margin-bottom: 30px;
}

.post-content h2 {
  font-size: 28px;
  margin-top: 40px;
  margin-bottom: 15px;
  font-weight: 400;
  color: #111;
}

.post-content h3 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 10px;
  font-weight: 400;
}

.post-content p {
  margin-bottom: 15px;
}

.post-content ul {
  margin-bottom: 15px;
  margin-left: 30px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content img {
  max-width: 100%;
  height: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e8e8e8;
  padding: 30px 0;
  background-color: #f9f9f9;
}

.footer-col-wrapper {
  font-size: 15px;
  color: #828282;
  margin-left: -15px;
}

.footer-col-wrapper::after {
  content: "";
  display: table;
  clear: both;
}

.footer-col {
  float: left;
  margin-bottom: 15px;
  padding-left: 15px;
}

.footer-col-1 {
  width: 50%;
}

.footer-col-2 {
  width: 50%;
}

.contact-list {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.contact-list li {
  margin-bottom: 10px;
}

.contact-list a {
  color: #828282;
  display: inline-block;
}

.contact-list a:hover {
  color: #2a7ae2;
}

.contact-list .icon {
  margin-right: 5px;
  display: inline-block;
  width: 20px;
  text-align: center;
}

.username {
  display: inline-block;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2a7ae2, #1e5bb8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-color: #2a7ae2;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card-header {
  margin-bottom: 15px;
}

.project-card-header h3 {
  font-size: 20px;
  margin: 0 0 8px 0;
  font-weight: 500;
  line-height: 1.4;
}

.project-card-header h3 a {
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-card-header h3 a:hover {
  color: #2a7ae2;
  text-decoration: none;
}

.project-date {
  font-size: 14px;
  color: #828282;
  font-style: italic;
}

.project-description {
  margin: 15px 0;
  color: #555;
  line-height: 1.6;
  font-size: 15px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: #f0f0f0;
  color: #555;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: #2a7ae2;
  color: #fff;
}

.project-link {
  display: inline-block;
  color: #2a7ae2;
  font-weight: 500;
  text-decoration: none;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.project-link:hover {
  color: #1e5bb8;
  transform: translateX(5px);
  text-decoration: none;
}

/* Fade-in animation */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-element.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Project page specific styles */
.project-meta {
  background: #f9f9f9;
  padding: 15px 20px;
  border-left: 4px solid #2a7ae2;
  margin: 20px 0;
  border-radius: 4px;
}

.project-navigation {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: #2a7ae2;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #1e5bb8;
  transform: translateX(-5px);
  text-decoration: none;
}

/* Active navigation link */
.site-nav .page-link.active {
  color: #2a7ae2;
  font-weight: 500;
}

/* Enhanced heading styles */
.post-content h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #111;
  font-weight: 600;
}

/* Smooth animations */
* {
  scroll-behavior: smooth;
}

/* Responsive design */
@media screen and (max-width: 800px) {
  .site-nav {
    position: absolute;
    top: 9px;
    right: 15px;
    background-color: #fdfdfd;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    text-align: right;
  }

  .site-nav .page-link {
    display: block;
    padding: 5px 10px;
    margin-left: 20px;
  }

  .footer-col-1,
  .footer-col-2 {
    width: 100%;
  }

  .post-content img[style*="float: right"] {
    float: none !important;
    display: block;
    margin: 0 auto 1em !important;
    max-width: 50% !important;
  }
}

@media screen and (max-width: 600px) {
  .wrapper {
    padding-right: 15px;
    padding-left: 15px;
  }

  .site-title {
    font-size: 22px;
  }

  .post-content h2 {
    font-size: 24px;
  }

  .post-content h3 {
    font-size: 20px;
  }

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

  .project-card {
    padding: 20px;
  }
}
