/* Base styles */
html, body { 
  background: white; 
}

html { 
  height: 100%; 
}

body {
  color: black;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  min-height: 100%;
  overflow-wrap: break-word;
}

.w {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Header */
header {
  margin-bottom: 3rem;
}

.hhh1 {
  margin-bottom: 2rem;
}

.hhh1 img {
  display: block;
  margin: 0 auto 1rem;
}

.hhh1 h1 {
  text-align: center;
  margin: 0;
  background: linear-gradient(90deg, #9c27b0, #1976d2, #e91e63);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Material Design Headings */
.material-heading {
  font-size: 1.5rem;
  font-weight: 500;
  background: linear-gradient(90deg, #9c27b0, #1976d2, #e91e63);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* Content sections */
.content-section {
  margin-bottom: 2.5rem;
}

.content-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.content-list li {
  margin: 0.8rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.content-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  background: linear-gradient(90deg, #9c27b0, #1976d2, #e91e63);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: bold;
}

/* Links */
a {
  color: #1976d2;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1565c0;
  text-decoration: underline;
}

/* Accordion */
.accordion-toggle {
  cursor: pointer;
  display: inline-block;
}

.accordion-content {
  display: none !important;
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

.accordion-content.expanded {
  display: block !important;
}

.accordion-content p {
  margin: 1rem 0;
}

.accordion-content img {
  margin: 1rem 0;
}

/* Post meta */
.post-meta { 
  text-align: right; 
  color: #757575;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Update posts */
.update-post {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

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

.update-post h2 {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #424242;
}

/* Headings */
h1 {
  font-size: 2rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  color: #212121;
}

h2, h3, h4, h5, h6 { 
  margin-top: 2rem; 
  margin-bottom: 1rem;
  font-weight: 500;
  color: #424242;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

/* Paragraphs */
p { 
  margin: 1rem 0; 
}

/* Lists */
ul {
  margin: 1.5rem 0;
}

li { 
  margin: 0.5rem 0; 
}

/* Tables */
table { 
  width: 100%; 
  margin: 1.5rem 0;
}

table, th, td {
  border: none;
  border-collapse: collapse;
  padding: 0.5rem;
}

/* Images */
img {
  max-width: 100%;
  display: block;
  margin: 1rem auto;
  height: auto;
}

/* Code */
code {
  color: white;
  background: black;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: monospace;
}

div.highlighter-rouge code {
  display: block;
  overflow-x: auto;
  white-space: pre-wrap;
  padding: 1rem;
}

/* Blockquotes */
blockquote {
  font-style: italic;
  border-left: 4px solid #1976d2;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #424242;
}

blockquote p { 
  margin: 0; 
}

/* Horizontal rules */
hr { 
  margin: 2rem 0; 
  text-align: center;
  border: 0;
}

hr::before { 
  content: '/////'; 
  color: #757575;
}

hr::after { 
  content: attr(data-content) '/////'; 
  color: #757575;
}

/* Target highlighting */
*:target { 
  background: #fff9c4; 
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  text-align: center;
  color: #757575;
  font-size: 0.9rem;
}

.site-footer a {
  margin: 0 0.5rem;
}

/* Back link */
a[href="/"] {
  display: inline-block;
  margin-bottom: 1rem;
  color: #757575;
}

a[href="/"]:hover {
  color: #1976d2;
}

/* Responsive */
@media (max-width: 768px) {
  .w {
    padding: 1.5rem 1rem;
  }
  
  body {
    font-size: 18px; /* Larger base font for mobile readability */
    line-height: 1.7; /* More line spacing for easier reading */
  }
  
  .material-heading {
    font-size: 1.4rem;
    margin-top: 2rem;
  }
  
  h1 {
    font-size: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  /* Better spacing for mobile */
  .content-section {
    margin-bottom: 2rem;
  }
  
  .content-list li {
    margin: 1rem 0;
    padding-left: 1.5rem;
  }
  
  /* Table responsiveness */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table tr {
    display: flex;
    flex-direction: column;
  }
  
  table td {
    display: block;
    padding: 0.75rem 0;
  }
  
  table td:first-child {
    text-align: center;
  }
  
  table img {
    margin: 0 auto;
  }
  
  /* Better touch targets */
  a {
    min-height: 44px;
    display: inline-block;
    padding: 0.25rem 0;
  }
  
  .accordion-toggle {
    min-height: 44px;
    padding: 0.5rem 0;
  }
  
  /* Footer links spacing */
  .site-footer a {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.5rem;
  }
  
  /* Images */
  img {
    margin: 1.5rem auto;
  }
  
  /* Header adjustments */
  header {
    margin-bottom: 2rem;
  }
  
  .hhh1 {
    margin-bottom: 1.5rem;
  }
  
  .hhh1 img {
    margin-bottom: 0.5rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .w {
    padding: 1rem 0.75rem;
  }
  
  body {
    font-size: 17px;
  }
  
  .material-heading {
    font-size: 1.25rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  .content-list li {
    padding-left: 1.25rem;
  }
  
  .accordion-content {
    padding-left: 1rem;
  }
}

