/* Base styles */
:root {
  --primary-color: #0070f3;
  --text-color: #333;
  --light-text: #666;
  --background: #fff;
  --light-background: #f9f9f9;
  --border-color: #eaeaea;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  background-color: var(--background);
  max-width: 100vw;
  overflow-x: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin: 1.5rem 0 1rem;
}

h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

p, ul, ol {
  margin-bottom: 1.5rem;
}

ul, ol {
  padding-left: 1.5rem;
}

code {
  font-family: var(--font-mono);
  background-color: var(--light-background);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background-color: var(--light-background);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background-color: transparent;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  color: var(--light-text);
  font-style: italic;
  margin: 1.5rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
  font-size: 0.9em;
}

table th,
table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
}

table th {
  background-color: var(--light-background);
  font-weight: 600;
  text-align: left;
}

table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

table tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}


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

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}

.post-header {
  border-bottom: none;
  padding-bottom: 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  color: var(--text-color);
}

nav li.active a {
  color: var(--primary-color);
  font-weight: 600;
}

main {
  padding: 3rem 0;
  min-height: calc(100vh - 180px);
}

footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  color: var(--light-text);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-links a {
  margin-left: 1rem;
}

/* Blog styles */
.post-meta {
  color: var(--light-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-content h1:first-child {
  display: none; /* Hide the first h1 in content as we already show it in the header */
}

.post-tags {
  display: flex;
  margin-left: 1rem;
}

.tag {
  background-color: var(--light-background);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.post-preview {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-preview h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post-preview .post-meta {
  margin-bottom: 0.5rem;
}

.post-preview .post-excerpt {
  margin-top: 0.5rem;
}

.post-preview .post-excerpt p {
  margin-bottom: 0;
}

.post-preview header {
  margin-bottom: 0.5rem;
}

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

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav {
    margin-top: 1rem;
  }
  
  nav ul {
    flex-wrap: wrap;
  }
  
  nav li {
    margin: 0 1rem 0 0;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
  }
  
  .social-links {
    margin-top: 1rem;
  }
  
  .social-links a:first-child {
    margin-left: 0;
  }
} 
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121212;
    --light-background: #1a1a1a;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --link-color: #64b5f6;
    --link-hover-color: #90caf9;
    --border-color: #333333;
    --code-bg: #1e1e1e;
    --blockquote-border: #444444;
    --blockquote-bg: #1a1a1a;
    --table-border: #333333;
    --table-header-bg: #1e1e1e;
    --table-row-alt-bg: #1a1a1a;
  }
  
  pre, code {
    background-color: var(--code-bg);
    color: #e0e0e0;
  }
  
  blockquote {
    background-color: var(--blockquote-bg);
    border-left-color: var(--blockquote-border);
  }
  
  table {
    border-color: var(--table-border);
  }
  
  th {
    background-color: var(--table-header-bg);
  }
  
  tr:nth-child(even) {
    background-color: var(--table-row-alt-bg);
  }
  
  img {
    opacity: 0.9;
    filter: brightness(0.9);
  }
}

/* Focus styles for interactive elements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Project Filters */
#project-filters {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--light-background);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.search-container {
  margin-bottom: 0.75rem;
}

.project-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  background-color: var(--background);
  color: var(--text-color);
}

.project-search:focus {
  border-color: var(--accent);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.category-filter {
  padding: 0.3rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  color: var(--text-color);
}

.category-filter:hover {
  background-color: var(--light-accent);
}

.category-filter:focus {
  border-color: var(--accent);
}

.category-filter.active {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.project-counter {
  font-size: 0.85rem;
  color: var(--light-text);
}

/* Projects */
#projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project {
  padding: 1.25rem;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: box-shadow 0.2s ease;
}

.project:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.project h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.project p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project .tag {
  padding: 0.2rem 0.5rem;
  background-color: var(--light-background);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  .project .tag {
    background-color: rgba(255, 255, 255, 0.08);
  }
  
  .category-filter {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .category-filter:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .project-search {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
  }
  
  a:focus,
  button:focus,
  input:focus,
  select:focus,
  textarea:focus,
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline-color: var(--link-color);
  }
}

@media (max-width: 768px) {
  #projects-container {
    grid-template-columns: 1fr;
  }
  
  .category-filters {
    gap: 0.3rem;
  }
  
  .category-filter {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}
