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

html,
body {
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #e8e8e8;
  background-color: #0f0f0f;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html {
  scroll-behavior: smooth;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: #1a1a1a;
}

body::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
  background-color: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-title-header {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.site-nav {
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #d0d0d0;
  text-decoration: none;
  margin-right: 8px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 4px 0;
}

.site-nav a:hover,
.site-nav a.current {
  color: #4a9eff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.page-content {
  padding: 32px 0;
  flex: 1;
}

.site-title {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.intro {
  margin-bottom: 48px;
  font-size: 20px;
  line-height: 1.6;
  color: #c0c0c0;
}

.intro p {
  margin-bottom: 12px;
}

.social-links-home {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 0;
  width: fit-content;
  margin-left: 0;
  margin-right: auto;
}

.social-links-home a,
.social-links-home button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e0e0e0;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.email-copy {
  width: 260px !important;
  padding: 0 18px;
  gap: 12px;
}

.email-text {
  font-size: 13px;
  white-space: nowrap;
  font-weight: 500;
}

.social-links-home a.resume-button {
  width: auto;
  padding: 0 14px;
  height: 40px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

.social-links-home a:hover,
.social-links-home button:hover {
  background-color: #2a2a2a;
  border-color: #4a9eff;
  color: #4a9eff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.15);
}

.social-links-home svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.email-copy {
  font-family: inherit;
  font-size: inherit;
}

.post-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.column h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.post-item {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-date {
  font-size: 14px;
  color: #888;
  font-weight: 500;
}

.post-link {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.2s ease;
  font-weight: 500;
}

.post-link:hover {
  color: #4a9eff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.no-posts {
  color: #777;
  font-style: italic;
  font-size: 15px;
}

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

.post-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.post-meta {
  margin-bottom: 20px;
  font-size: 15px;
  color: #888;
  font-weight: 500;
}

.post-category {
  margin-left: 16px;
  padding: 4px 12px;
  background-color: #2a2a2a;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4a9eff;
}

.post-description {
  font-size: 20px;
  color: #b0b0b0;
  margin-top: 20px;
  line-height: 1.5;
}

.post-content {
  font-size: 18px;
  line-height: 1.7;
  color: #d0d0d0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 40px 0 20px 0;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.post-content h1 {
  font-size: 32px;
  line-height: 1.2;
}
.post-content h2 {
  font-size: 28px;
  line-height: 1.3;
}
.post-content h3 {
  font-size: 24px;
  line-height: 1.3;
}

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

.post-content a {
  color: #4a9eff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.post-content a:hover {
  color: #66b3ff;
}

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

.post-content li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.post-content code {
  background-color: #1a1a1a;
  color: #e8e8e8;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 15px;
  border: 1px solid #333;
}

.post-content pre {
  background-color: #1a1a1a;
  color: #e8e8e8;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid #2a2a2a;
  line-height: 1.5;
}

.post-content pre code {
  background: none;
  padding: 0;
  border: none;
}

.post-content blockquote {
  border-left: 4px solid #4a9eff;
  padding-left: 20px;
  margin: 24px 0;
  color: #b0b0b0;
  font-style: italic;
  background-color: rgba(74, 158, 255, 0.05);
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
}

.page-content h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.page-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 14px 0 20px 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.page-content p {
  margin-bottom: 8px;
  line-height: 1.7;
  color: #d0d0d0;
}

.page-content strong {
  color: #4a9eff;
  font-weight: 700;
}

.page-content ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.page-content li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #d0d0d0;
}

.blog-image {
  margin: 32px 0;
  text-align: center;
}

.blog-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.image-caption {
  margin-top: 16px;
  font-size: 15px;
  color: #888;
  font-style: italic;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.blog-list {
  margin-top: 24px;
}

.blog-post {
  border-bottom: 1px solid #2a2a2a;
}

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

.blog-post h2 {
  margin-bottom: 4px;
}

.blog-post h2 a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.blog-post h2 a:hover {
  color: #4a9eff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.blog-excerpt {
  color: #b0b0b0;
  margin-top: 12px;
  line-height: 1.6;
}

.projects-list {
  margin-top: 24px;
}

.project-item {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #2a2a2a;
}

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

.project-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-title a {
  color: #ffffff;
  text-decoration: none;
}

.project-title a:hover {
  color: #4a9eff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.project-description {
  color: #b0b0b0;
  margin-bottom: 12px;
  line-height: 1.6;
}

.project-links a {
  color: #4a9eff;
  text-decoration: none;
  margin-right: 20px;
  font-size: 15px;
  font-weight: 500;
}

.project-links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer {
  border-top: 1px solid #2a2a2a;
  padding: 20px 0;
  flex-shrink: 0;
  background-color: rgba(15, 15, 15, 0.95);
}

.footer-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.footer-content p {
  color: #888;
  font-size: 15px;
  margin: 0;
}

.footer-content a {
  color: #4a9eff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-content a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    min-height: 100vh;
  }

  .page-content {
    padding: 24px 0;
  }

  .wrapper {
    padding: 0 20px;
  }

  .header-content {
    padding: 0 20px;
  }

  .site-title-header {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .site-nav a {
    margin-right: 8px;
    font-size: 15px;
  }

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

  .intro {
    font-size: 18px;
    margin-bottom: 40px;
  }

  .social-links-home {
    padding: 0;
    gap: 12px;
    width: fit-content;
    margin-bottom: 40px;
    flex-wrap: wrap;
  }

  .social-links-home a,
  .social-links-home button {
    width: 36px;
    height: 36px;
  }

  .email-copy {
    width: 240px !important;
    padding: 0 16px;
    gap: 10px;
  }

  .email-text {
    font-size: 12px;
  }

  .social-links-home a.resume-button {
    width: auto;
    padding: 0 12px;
    height: 36px;
    font-size: 12px;
  }

  .social-links-home svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .post-columns {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 40px;
  }

  .column h2 {
    font-size: 24px;
  }

  .post-title {
    font-size: 28px;
  }

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

  .post-content h1 {
    font-size: 28px;
  }

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

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

  .footer-content {
    padding: 0 20px;
  }

  .footer-content p {
    font-size: 14px;
  }
}

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 50%;
  color: #e0e0e0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:hover {
  background-color: #2a2a2a;
  border-color: #4a9eff;
  color: #4a9eff;
  transform: translateY(0);
  box-shadow: 0 6px 25px rgba(74, 158, 255, 0.2);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .scroll-to-top svg {
    width: 18px;
    height: 18px;
  }
}

.post-navigation {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid #333;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-previous,
.nav-next {
  flex: 1;
  max-width: 48%;
}

.nav-next {
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
  border: 2px solid #333;
  border-radius: 12px;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 120px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(74, 158, 255, 0.1) 0%,
    rgba(74, 158, 255, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:hover::before,
.nav-link:focus::before {
  opacity: 1;
}

.nav-link:hover,
.nav-link:focus {
  background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
  border-color: #4a9eff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(74, 158, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
  outline: none;
}

.nav-link:focus {
  border-color: #66b3ff;
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.3),
    0 8px 25px rgba(74, 158, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-link:active {
  transform: translateY(-2px) scale(1.01);
}

.nav-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.nav-label {
  display: block;
  font-size: 0.75rem;
  color: #4a9eff;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  opacity: 0.9;
}

.nav-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.5rem;
}

.nav-hint {
  display: block;
  font-size: 0.7rem;
  color: #888;
  font-style: italic;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-link:hover .nav-hint,
.nav-link:focus .nav-hint {
  opacity: 1;
  color: #aaa;
}

.nav-arrow {
  flex-shrink: 0;
  color: #4a9eff;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(74, 158, 255, 0.1);
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.nav-link:hover .nav-arrow,
.nav-link:focus .nav-arrow {
  transform: scale(1.2);
  background: rgba(74, 158, 255, 0.2);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
}

.nav-arrow svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.nav-link:hover .nav-arrow svg,
.nav-link:focus .nav-arrow svg {
  transform: translateX(2px);
}

.nav-previous .nav-link {
  text-align: left;
}

.nav-next .nav-link {
  text-align: right;
  flex-direction: row-reverse;
}

.nav-previous .nav-link:hover .nav-arrow svg,
.nav-previous .nav-link:focus .nav-arrow svg {
  transform: translateX(-2px);
}

@media (max-width: 768px) {
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
  }

  .nav-previous,
  .nav-next {
    max-width: 100%;
  }

  .nav-next {
    margin-left: 0;
  }

  .nav-link {
    padding: 1.25rem;
    min-height: 100px;
    gap: 0.875rem;
  }

  .nav-title {
    font-size: 1rem;
  }

  .nav-label {
    font-size: 0.7rem;
  }

  .nav-hint {
    font-size: 0.65rem;
  }

  .nav-arrow {
    width: 40px;
    height: 40px;
  }

  .nav-arrow svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .nav-link {
    padding: 1rem;
    min-height: 80px;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .nav-next .nav-link {
    flex-direction: column;
  }

  .nav-arrow {
    align-self: center;
    margin: 0 auto;
  }

  .nav-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .nav-arrow,
  .nav-arrow svg,
  .nav-hint {
    transition: none;
  }

  .nav-link:hover,
  .nav-link:focus {
    transform: none;
  }
}
