/* ========================================
   Reset & Base
   ======================================== */

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

html {
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Muli', sans-serif;
  color: #323232;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #CC7E02;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #a86600;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.33rem; }
h4 { font-size: 1.11rem; }

strong, b {
  font-weight: 600;
}

p {
  margin-bottom: 1em;
}

hr {
  border: none;
  border-top: 1px solid #E1E0E1;
  margin: 2rem 0;
}

/* ========================================
   Layout
   ======================================== */

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main.wrapper {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* ========================================
   Header
   ======================================== */

.site-header {
  border-bottom: 1px solid #E1E0E1;
  padding: 1rem 0;
}

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

.site-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #323232;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.site-title:hover {
  color: #CC7E02;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #323232;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.site-nav {
  display: none;
  width: 100%;
  padding-top: 1rem;
}

.site-nav.open {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  font-family: 'Muli', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: #7E7E7E;
  padding: 0.25rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: #CC7E02;
}

@media (min-width: 640px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: auto;
    padding-top: 0;
  }
}

/* ========================================
   Post Cards (Blog Index)
   ======================================== */

.post-list {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 640px) {
  .post-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  background: #fff;
  border-bottom: 1px solid #CC7E02;
  padding: 1.5rem;
  transition: box-shadow 0.3s;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.post-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #323232;
  transition: color 0.3s;
}

.post-card:hover .post-card__title {
  color: #CC7E02;
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.post-card__meta {
  font-size: 0.8rem;
  color: #7E7E7E;
}

.reading-time {
  color: #7E7E7E;
}

/* ========================================
   Single Post
   ======================================== */

.post {
  max-width: 740px;
  margin: 0 auto;
}

.post__header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E1E0E1;
}

.post__title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.post__meta {
  font-size: 0.85rem;
  color: #7E7E7E;
}

.post__tags {
  margin-top: 0.75rem;
}

.tag {
  display: inline-block;
  background: #ECF0F1;
  padding: 0.15rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7E7E7E;
  transition: background 0.3s;
}

.tag:hover {
  background: #dde1e2;
}

/* Post Content */

.post__content {
  font-size: 1rem;
  line-height: 1.75;
}

.post__content h2 {
  margin-top: 2rem;
}

.post__content h3 {
  margin-top: 1.5rem;
}

.post__content a {
  color: #CC7E02;
  text-decoration: underline;
  text-decoration-color: rgba(204, 126, 2, 0.3);
  text-underline-offset: 2px;
}

.post__content a:hover {
  text-decoration-color: #CC7E02;
}

.post__content img {
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
}

.post__content blockquote {
  border-left: 3px solid #CC7E02;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #7E7E7E;
}

.post__content ul,
.post__content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.post__content li {
  margin-bottom: 0.25em;
}

/* Code */

.post__content code {
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  background: #f5f5f5;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post__content pre {
  background: #272822;
  color: #f8f8f2;
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.post__content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: inherit;
}

/* Comments */

.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #E1E0E1;
}

/* ========================================
   Pages (Me, Projects)
   ======================================== */

.page {
  max-width: 740px;
  margin: 0 auto;
}

.page__title {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Me Page */

.me-header {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid #E1E0E1;
  margin: 0 auto 1rem;
  display: block;
  object-fit: cover;
}

.me-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.me-header h2 {
  font-size: 1rem;
  font-family: 'Muli', sans-serif;
  font-weight: 400;
  color: #7E7E7E;
}

.me-content {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.me-content p {
  margin-bottom: 0.75em;
}

.social-links--me {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #E1E0E1;
}

.get-in-touch {
  font-size: 0.9rem;
  color: #7E7E7E;
  margin-bottom: 0.5rem;
}

.social-links--me a {
  display: inline-block;
  margin: 0 1rem;
  font-size: 1rem;
  color: #7E7E7E;
}

.social-links--me a:hover {
  color: #CC7E02;
}

.social-links--me .fa {
  margin-right: 0.3rem;
}

/* Projects Page */

.projects-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E1E0E1;
}

.projects-content h3:first-child {
  margin-top: 0;
}

.project {
  margin-bottom: 0.75rem;
  border: none;
  padding-left: 1.75rem;
  position: relative;
}

.project h4 {
  font-family: 'Muli', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.project h4 .fa {
  color: #7E7E7E;
  position: absolute;
  left: 0;
  top: 0.15rem;
}

.project-copyright {
  font-size: 0.8rem;
  font-weight: 300;
  color: #7E7E7E;
}

.project p {
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  color: #7E7E7E;
}

.project a {
  font-size: 0.9rem;
}

/* 404 */

.page--404 {
  text-align: center;
  padding: 4rem 0;
}

.page--404 h1 {
  font-size: 4rem;
  color: #E1E0E1;
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  background: #FAFAFA;
  padding: 2rem 0;
  margin-top: auto;
  border-top: 1px solid #E1E0E1;
}

.footer-wrapper {
  text-align: center;
}

.social-links a {
  display: inline-block;
  margin: 0 0.75rem;
  font-size: 1.3rem;
  color: #7E7E7E;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #CC7E02;
}

.copyright {
  font-size: 0.8rem;
  color: #7E7E7E;
  margin-top: 0.75rem;
}
