/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* San Francisco Font Stack */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 50px 20px;
  animation: fadeIn 0.6s ease-in;
}

@media (min-width: 992px) {
  .container {
    padding: 50px 35px;
  }
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.site-header {
  margin-bottom: 50px;
  text-align: center;
  animation: fadeIn 0.8s ease-in;
}

.site-title {
  font-size: 28px;
  font-weight: 600;
  color: #313131;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-title:hover {
  color: #2d7a3e;
}

/* Circular Text Animation */
.circular-text-link {
  display: inline-block;
  border-bottom: none;
}

.circular-text {
  animation: rotate 20s linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.circular-text-path {
  fill: #313131;
  font-size: 14px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 6px;
  text-transform: lowercase;
}

.circular-text-link:hover .circular-text-path {
  fill: #2d7a3e;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #313131;
  margin: 40px 0 20px;
  line-height: 1.3;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 26px;
  margin-top: 50px;
}

h3 {
  font-size: 22px;
}

p {
  margin-bottom: 20px;
}

/* Links */
a {
  color: #333333;
  text-decoration: none;
  border-bottom: 1px solid #b1b1b1;
  transition: all 0.2s ease;
}

a:hover {
  color: #2d7a3e;
  border-bottom-color: #2d7a3e;
}

.site-title,
.post-title a {
  border-bottom: none;
}

/* Home Page */
.home {
  animation: fadeIn 0.6s ease-in;
}

.posts {
  margin-top: 50px;
}

.posts h2 {
  margin-bottom: 30px;
  font-size: 24px;
}

.post-item {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e8e8e8;
  transition: transform 0.2s ease;
}

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

.post-item:hover {
  transform: translateX(5px);
}

.post-date {
  display: block;
  font-size: 14px;
  color: #888888;
  margin-bottom: 8px;
}

.post-item .post-title {
  margin: 0 0 10px 0;
  font-size: 22px;
}

.post-item .post-title a {
  color: #313131;
  transition: color 0.2s ease;
}

.post-item .post-title a:hover {
  color: #2d7a3e;
}

.post-excerpt {
  color: #666666;
  font-size: 15px;
  line-height: 1.5;
}

/* Post Page */
.post {
  animation: fadeIn 0.6s ease-in;
}

.post-header {
  margin-bottom: 40px;
}

.post-title {
  margin: 0 0 10px 0;
}

.post-meta {
  color: #888888;
  font-size: 14px;
}

.reading-time {
  color: #2d7a3e;
  font-weight: 500;
}

.post-content {
  font-size: 17px;
  line-height: 1.7;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 40px;
  margin-bottom: 15px;
}

.post-content ul,
.post-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

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

.post-content blockquote {
  margin: 30px 0;
  padding-left: 20px;
  border-left: 3px solid #2d7a3e;
  color: #666666;
  font-style: italic;
}

.post-content code {
  background-color: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
  font-size: 15px;
  color: #2d7a3e;
}

.post-content pre {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 30px 0;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
  color: #333333;
}

/* Images */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Videos */
.post-content video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 40px auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-container iframe,
.video-container object,
.video-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

/* Image captions */
.post-content img + em {
  display: block;
  text-align: center;
  font-size: 14px;
  color: #888888;
  margin-top: -30px;
  margin-bottom: 40px;
}

/* Post Navigation */
.post-navigation {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #e8e8e8;
}

.back-link {
  display: inline-block;
  color: #888888;
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #2d7a3e;
  border-bottom-color: #2d7a3e;
  transform: translateX(-3px);
}

/* Subtle pulse animation for links */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background-color: #2d7a3e;
  color: #ffffff;
}

::-moz-selection {
  background-color: #2d7a3e;
  color: #ffffff;
}
