/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #333;
  --secondary-color: #666;
  --accent-color: #0066cc;
  --background: #fafafa;
  --card-background: #fff;
  --max-width: 1200px;
  --content-width: 700px;
}

html {
  max-width: 70ch;
  padding: 3em 1em;
  margin: auto;
  line-height: 1.75;
  font-size: 1em;
}

body {
  font-family: "Archivo", sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  background-color: var(--background);
}

/* Navigation */
.navbar {
  background-color: var(--background);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 1rem 2rem;
}

.hero.homepage {
  min-height: 100vh;
  padding: 3rem 2rem 0 2rem;
}

.hero-content {
  text-align: center;
  max-width: var(--content-width);
}

.hero.homepage .hero-content {
  text-align: left;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 0;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
}

.main-links {
  margin-top: 1rem;
}

.main-links a:not(:last-child)::after {
  content: " • ";
  margin: 0 8px;
  text-decoration: none;
  display: inline-block;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  justify-content: flex-start;
}


.social-icons a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.social-icons a:hover {
  color: var(--accent-color);
}

.social-icons svg {
  width: 24px;
  height: 24px;
}

.bio {
  margin-bottom: 1rem;
}

ul {
  margin-bottom: 2rem;
}

/* Blog Styles */
main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem;
}

article {
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

article:last-child {
  border-bottom: none;
}

article h1,
article h2 {
  margin-bottom: 1rem;
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
}

article h2 a {
  color: var(--primary-color);
  text-decoration: none;
}

article h2 a:hover {
  text-decoration: underline;
}

article time {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

article p {
  margin: 1rem 0;
}

article img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
  display: block;
}

/* Code blocks */
pre {
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1rem 0;
}

code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "Courier New", monospace;
}

pre code {
  background: none;
  padding: 0;
}

/* Links */
a {
  color: var(--accent-color);
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #ddd;
  margin: 1rem 0;
  padding-left: 1rem;
  color: var(--secondary-color);
}

/* Highlights Section */
.highlights {
  margin: 3rem 0 2rem 0;
}

.highlights h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.highlight {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.highlight:last-child {
  border-bottom: none;
}

.highlight h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.highlight h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.highlight h3 a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.highlight p {
  color: var(--secondary-color);
  line-height: 1.6;
  margin: 0;
}

/* All Projects Section */
.all-projects {
  margin: 4rem 0 2rem 0;
  padding-top: 2rem;
  border-top: 2px solid #eee;
}

.all-projects h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.project-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

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

.project-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-item h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.project-item h3 a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.project-item p {
  color: var(--secondary-color);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* Blog Section on Homepage */
.blog-section {
  padding: 4rem 2rem;
}

.blog-section h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.blog-entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
}

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

.blog-entry h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  font-weight: 500;
}

.blog-entry h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.blog-entry h3 a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.entry-meta {
  margin-bottom: 0.5rem;
}

.blog-entry time {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.blog-entry p {
  color: var(--secondary-color);
  line-height: 1.6;
  margin: 0;
}

.blog-footer {
  margin-top: 2rem;
  text-align: right;
}

.view-all {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.view-all:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .hero-links {
    flex-direction: column;
    align-items: center;
  }

  .hero-link {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}
