body {
  font-family: sans-serif;
  color: #333333;
  background: #ececec;
  line-height: 1.6;
  margin: 0;
  padding: 2rem;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

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

/* Lists */
ul,
ol {
  margin: 1.2rem 0 1.2rem 2rem;
  padding: 0;
}

/* Links */
header a {
  text-decoration: none;
}
header a:hover {
  text-decoration: underline;
}

/* Code blocks */
pre,
code {
  font-family: monospace;
  background: #ddd;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}
pre {
  overflow: auto;
  margin: 1.5rem 0;
}

/* Images */
img {
  border-radius: 8px;
  max-width: 100%;
  display: block;
  margin: 1.5rem auto;
}

/* GitHub Contribution Grid */
.gh-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.gh-grid {
  --gh-cell: clamp(5px, calc((100vw - 64px) / 60), 12px);
  --gh-gap: clamp(1px, calc(var(--gh-cell) / 3), 4px);
  display: grid;
  grid-template-rows: repeat(7, var(--gh-cell));
  grid-template-columns: repeat(53, var(--gh-cell));
  grid-auto-columns: var(--gh-cell);
  gap: var(--gh-gap);
  padding: 8px;
  border-radius: 8px;
  background: #f4f4f4;
  transition: opacity 0.3s ease;
  width: max-content;
}

@media (max-width: 600px) {
  .gh-wrapper {
    display: none;
  }
}

.gh-grid:hover {
  opacity: 1;
}

.gh-day {
  width: var(--gh-cell);
  height: var(--gh-cell);
  border-radius: 3px;
}

.gh-day.level-0 {
  background: #e4ecea;
}

.gh-day.level-1 {
  background: #b8e0d6;
}

.gh-day.level-2 {
  background: #7cc8b5;
}

.gh-day.level-3 {
  background: #4fb3a0;
}

.gh-day.level-4 {
  background: #2a9d8f;
}

body.dark .gh-grid {
  background: #1e1e1e;
}

body.dark .gh-day.level-0 {
  background: #2b3333;
}

body.dark .gh-day.level-1 {
  background: #2f6f6a;
}

body.dark .gh-day.level-2 {
  background: #379389;
}

body.dark .gh-day.level-3 {
  background: #3cb0a5;
}

body.dark .gh-day.level-4 {
  background: #4ecdc4;
}

.tagline {
  text-align: center;
}

/* Overall rhythm */
section,
article {
  margin-bottom: 2.5rem;
}

body {
  display: flex;
  background: #ececec;
  flex-direction: column;
  min-height: 100vh;
  color: #333333;
  font-family: monospace, sans-serif;
  margin: 0 auto;
  max-width: 650px;
  padding: 0 16px;

  a {
    color: #333333;
  }
}

main {
  flex-grow: 1;
}

body.dark {
  background: #333333 !important;
  color: #ececec !important;
  transition:
    color 1s ease-in,
    background-color 1s ease-in;

  a {
    color: #ececec !important;
    transition: color 1s ease-in;
  }
}

body.australia {
  transform: rotate(180deg);
}

body.sleeping::after {
  height: 100%;
  width: 100%;
  position: absolute;
  content: "zzzzzzzz...";
  background: #000000 !important;
  color: #ececec !important;
  animation: fadeOut 2s ease-in forwards;
  display: flex;
  justify-content: center;
  padding-top: 50vh;
}

@keyframes fadeOut {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

code {
  padding: 0.2em 0.4em;
  margin: 0;
  white-space: break-spaces;
  background-color: #818b9833;
  border-radius: 6px;
}

footer {
  font-size: 1em;
  text-align: center;
  padding-bottom: 24px;
  bottom: 0;
}

footer a {
  font-size: 1em;
  text-decoration: none;
  text-decoration: underline;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-card {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.project-card:hover {
  border-color: #9aa4ae;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.05rem;
}

.project-description {
  margin: 0 0 1rem;
  color: #57606a;
  flex-grow: 1;
  font-size: 0.95rem;
}

.project-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.language-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #eaeef2;
  color: #57606a;
}

body.dark .project-card {
  background: #1e1e1e;
  border-color: #3d444d;
}

body.dark .project-card:hover {
  border-color: #6e7681;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark .project-description {
  color: #9aa4ae;
}

body.dark .language-pill {
  background: #2b3333;
  color: #c5ced6;
}

.home main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-link {
  display: block;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
}
.blog-title {
  font-size: 1.2rem;
  font-weight: bold;
}
.blog-date {
  font-style: italic;
  color: #555;
}

/* Draft action buttons */
.draft-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.draft-actions .btn-publish,
.draft-actions .btn-edit,
.draft-actions .btn-delete {
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.draft-actions .btn-publish {
  background-color: #22c55e;
  color: white;
}

.draft-actions .btn-publish:hover {
  background-color: #16a34a;
}

.draft-actions .btn-edit {
  background-color: #3b82f6;
  color: white;
}

.draft-actions .btn-edit:hover {
  background-color: #2563eb;
}

.draft-actions .btn-delete {
  background-color: #ef4444;
  color: white;
}

.draft-actions .btn-delete:hover {
  background-color: #dc2626;
}
