@media (min-width: 50em) {
  @font-face {
    font-family: 'PT Sans';
    src: local("PT Sans"), local("PTSans-Regular"), url("../fonts/PTSans-Regular.woff") format("woff");
    font-weight: normal;
    font-style: normal;
  }
  @font-face {
    font-family: 'PT Sans';
    src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/PTSans-Bold.woff") format("woff");
    font-weight: bold;
    font-style: normal;
  }
}

html {
  background: #ffffff;
  color: #1a1a1a;
  font-size: 16px;
  font-size: calc(0.8rem + 0.3vw);
}

body {
  font-weight: 400;
  line-height: 1.7;
  font-size: 0.95em;
  margin: 0;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: -apple-system, BlinkMacSystemFont,
  "Hiragino Kaku Gothic ProN",
  "Hiragino Sans",
  "Yu Gothic",
  YuGothic,
  Meiryo,
  sans-serif;
  letter-spacing: 0.02em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.8em;
  letter-spacing: -0.01em;
}

b, strong, th {
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: inherit;
}

a:hover {
  text-decoration: none;
}

article a {
  color: #0066cc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

article a:hover {
  border-bottom-color: #0066cc;
}

header time {
  color: #6c757d;
  font-size: 0.9em;
}

hr {
  border: 0;
  border-top: 1px solid #e1e4e8;
  margin: 2.5em 0;
}

article:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 2em;
  margin-bottom: 2em;
}

blockquote {
  background: #f8f9fa;
  border-left: 4px solid #0066cc;
  padding: 1em 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #495057;
}

blockquote, figure {
  margin: 1em 0;
}

img, li {
  margin: .5em 0;
}

img {
  border-radius: 2px;
  max-width: 50%;
  height: auto;
  text-align: center;
  margin: 0 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e1e4e8;
  margin: 1.5em 0;
}

th, td {
  padding: 0.7em 1em;
  border: 1px solid #e1e4e8;
  text-align: left;
}

th {
  background: #f6f8fa;
  font-weight: 600;
}

tr:nth-child(even) {
  background: #fafbfc;
}

tr:hover {
  background: #f6f8fa;
}

pre {
  background: #f6f8fa;
  border-radius: 6px;
  font-size: 0.85em;
  margin: 1.5em 0;
  padding: 1.2em 1.5em;
  overflow-x: auto;
  border: 1px solid #e1e4e8;
  line-height: 1.6;
}

:not(pre) > code {
  font-size: 0.9em;
  background: #f3f4f6;
  color: #e01e5a;
  border-radius: 4px;
  padding: 0.2em 0.4em;
  margin: 0 0.1em;
  border: 1px solid #e5e7eb;
}

body > header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

body > header > a {
  font-size: 1.4em;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

article header {
  margin-bottom: 1.5em;
}

article header h1 {
  font-size: 2.2em;
  margin: 0 0 0.3em;
  color: #1a1a1a;
  font-weight: 800;
}

nav {
  margin: .5em -.8em;
}

nav a {
  margin: 0.5em 0.8em;
  color: #495057;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #0066cc;
}

body > header, body > article, body > footer {
  padding: 1.8em;
}

@media (min-width: 32em) {
  body > header, body > article, body > footer {
    padding: 1.75em calc(44% - 14em);
  }
  
  body > header {
    padding: 1.2em calc(44% - 14em);
  }
}

figure.center {
  text-align: center;
}

figure.center img {
  margin: 0 auto;
}

code {
  font-family: Consolas, Menlo, Monaco, -apple-system, BlinkMacSystemFont, "Segoe UI", Meiryo, monospace;
}

/* Image Modal Styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.image-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1001;
}

.image-modal-close:hover,
.image-modal-close:focus {
  color: #bbb;
  text-decoration: none;
}

/* Add hover effect to article images */
article img:hover {
  opacity: 0.9;
  transition: opacity 0.2s;
}