/* Catppuccin Mocha palette
   base:     #1e1e2e   mantle:   #181825   crust:    #11111b
   surface0: #313244   surface1: #45475a   surface2: #585b70
   overlay0: #6c7086   overlay1: #7f849c   overlay2: #9399b2
   subtext0: #a6adc8   subtext1: #bac2de   text:     #cdd6f4
   mauve:    #cba6f7   blue:     #89b4fa   lavender: #b4befe
   teal:     #94e2d5   sky:      #89dceb   sapphire: #74c7ec
   green:    #a6e3a1   yellow:   #f9e2af   peach:    #fab387
   red:      #f38ba8   pink:     #f5c2e7   rosewater:#f5e0dc
*/

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

body {
  background: #1e1e2e;
  color: #cdd6f4;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.75;
}

a {
  color: #89b4fa;
  text-decoration: underline;
}

a:hover {
  color: #b4befe;
}

a:visited {
  color: #cba6f7;
}

#wrapper {
  max-width: 880px;
  margin: 0 auto;
  border-left: 1px solid #11111b;
  border-right: 1px solid #11111b;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────── */
#header {
  padding: 22px 28px 18px;
  background: #181825;
  border-bottom: 2px solid #11111b;
}

#site-title {
  font-size: 23px;
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;
}

#site-title a {
  color: #cba6f7;
  text-decoration: none;
}

#site-title a:hover {
  color: #f5c2e7;
}

#site-desc {
  font-size: 12px;
  color: #6c7086;
  margin-top: 6px;
  letter-spacing: 2px;
}

/* ── Navigation ─────────────────────────── */
#nav {
  background: #181825;
  padding: 9px 28px;
  border-bottom: 1px solid #11111b;
  font-size: 14px;
  letter-spacing: 1px;
}

#nav a {
  color: #89b4fa;
  text-decoration: none;
}

#nav a:hover {
  color: #b4befe;
  text-decoration: underline;
}

#nav a.active {
  color: #cba6f7;
  font-weight: bold;
}

#nav a:visited {
  color: #89b4fa;
}

#nav a.active:visited {
  color: #cba6f7;
}

#nav .sep {
  color: #313244;
  margin: 0 10px;
}

/* ── Main content ───────────────────────── */
#main {
  padding: 30px 32px;
  min-height: calc(100vh - 165px);
  background: #1e1e2e;
}

/* ── Footer ─────────────────────────────── */
#footer {
  border-top: 1px solid #11111b;
  padding: 13px 28px;
  font-size: 13px;
  color: #6c7086;
  background: #181825;
}

/* ── Typography ─────────────────────────── */
h1 {
  color: #cba6f7;
  font-weight: bold;
  font-size: 21px;
  margin-bottom: 18px;
}

h2 {
  color: #89b4fa;
  font-weight: bold;
  font-size: 19px;
  margin-bottom: 15px;
  border-bottom: 1px solid #313244;
  padding-bottom: 7px;
}

h3 {
  color: #94e2d5;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 9px;
}

h4 {
  color: #cdd6f4;
  font-weight: bold;
  margin-bottom: 8px;
}

p { margin-bottom: 13px; }

hr {
  border: none;
  border-top: 1px solid #313244;
  margin: 15px 0;
}

ul, ol {
  margin-left: 24px;
  margin-bottom: 13px;
}

li { margin-bottom: 5px; }

/* ── About page ─────────────────────────── */
.about-grid {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.about-img {
  flex-shrink: 0;
}

.profile-img {
  width: 115px;
  height: 115px;
  object-fit: cover;
  border: 2px solid #cba6f7;
  display: block;
}

.about-text h2 {
  border: none;
  padding: 0;
  margin-bottom: 9px;
}

.about-links {
  margin-top: 17px;
  font-size: 14px;
}

.about-links a {
  margin-right: 18px;
}

/* ── Blog listing ───────────────────────── */
.post-entry {
  margin-bottom: 4px;
}

.post-entry h3 {
  margin-bottom: 3px;
  font-size: 15px;
}

.post-date {
  font-size: 13px;
  color: #6c7086;
  margin-bottom: 6px;
}

.post-desc {
  color: #7f849c;
  margin-bottom: 9px;
  font-size: 14px;
}

/* ── Pagination ─────────────────────────── */
.pagination {
  margin-top: 16px;
  font-size: 14px;
}

.pagination button {
  background: #181825;
  color: #89b4fa;
  border: 1px solid #313244;
  padding: 4px 10px;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  margin-right: 5px;
  margin-bottom: 5px;
}

.pagination button:hover {
  background: #313244;
  color: #cba6f7;
  border-color: #45475a;
}

.page-current {
  color: #cba6f7;
  font-weight: bold;
  margin-right: 5px;
  display: inline-block;
}

/* ── Single post ────────────────────────── */
.post h1 {
  margin-bottom: 6px;
}

.post-meta {
  font-size: 13px;
  color: #6c7086;
  margin-bottom: 0;
}

.post-content {
  margin-top: 24px;
  overflow-x: hidden;
}

.post-content p {
  margin-bottom: 15px;
}

.post-content h2,
.post-content h3 {
  margin-top: 24px;
}

.post-content pre {
  background: #181825;
  border: 1px solid #313244;
  border-left: 3px solid #89b4fa;
  padding: 13px 16px;
  overflow-x: auto;
  margin-bottom: 15px;
  font-size: 14px;
  color: #a6e3a1;
}

.post-content code {
  background: #313244;
  border: 1px solid #45475a;
  padding: 1px 6px;
  font-size: 14px;
  color: #a6e3a1;
}

.post-content pre code {
  border: none;
  padding: 0;
  background: transparent;
}

.post-content img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.post-content blockquote {
  border-left: 3px solid #cba6f7;
  background: #313244;
  padding: 11px 18px;
  color: #bac2de;
  margin: 15px 0;
}

.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 15px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}

.post-content th,
.post-content td {
  border: 1px solid #45475a;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.post-content th {
  background: #181825;
  color: #89b4fa;
  font-weight: 700;
}

.post-content tr:nth-child(even) td {
  background: #262636;
}

/* ── Repositories ───────────────────────── */
.repo-entry {
  margin-bottom: 4px;
}

.repo-entry h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: #89b4fa;
}

.repo-desc {
  color: #7f849c;
  margin-bottom: 7px;
  font-size: 14px;
}

.repo-meta {
  font-size: 13px;
  color: #6c7086;
  margin-bottom: 11px;
}

.repo-lang { color: #a6e3a1; }
.repo-fork { color: #6c7086; }

.page-note {
  color: #6c7086;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ── Contributions calendar ─────────────── */

/* Warm ramp, dark to bright. On a dark background intensity has to read as
   brightness, so the quietest days sit nearest the panel and the busiest
   land on Catppuccin's own peach and yellow -- the palette this site
   already uses, rather than two new colors bolted onto it. Change these
   five and the grid, legend and hover all follow. */
.contrib-panel {
  --cc-0: #313244;  /* surface0 -- no contributions */
  --cc-1: #6e4b1e;  /* deep amber */
  --cc-2: #c9853a;  /* orange */
  --cc-3: #fab387;  /* peach -- light orange */
  --cc-4: #f9e2af;  /* yellow -- light yellow */
  /* 53 weeks * 14px = 742px, which fills the ~756px left inside #main once
     the panel padding and the weekday labels are taken out. Shrink --cc-size
     and the whole grid, month row and legend scale with it. */
  --cc-size: 14px;  /* one column: cell + gap */
  --cc-cell: 11px;
  /* Height of the month-label row. The weekday labels sit in a separate
     column that starts at the top of the panel, above where the grid
     starts, so they must be pushed down by exactly this much or every
     label names the wrong day. Shared by both rules below so the two can't
     drift apart. */
  --cc-monthrow: 16px;

  background: #181825;
  border: 1px solid #11111b;
  padding: 14px 16px 12px;
  margin-bottom: 28px;
}

/* The grid is a fixed ~53 columns wide, so on a narrow viewport it scrolls
   here rather than stretching the page. */
.contrib-scroll {
  overflow-x: auto;
}

.contrib-body {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* Mon/Wed/Fri only, matching GitHub -- seven labels at this cell size would
   collide. Spaced to line up with rows 2, 4 and 6. */
.contrib-days {
  display: grid;
  grid-template-rows: repeat(7, var(--cc-size));
  font-size: 9px;
  color: #6c7086;
  /* Clears the month row, so row 1 here lines up with row 1 of the grid
     (Sunday) and the labels below land on the days they name. */
  padding-top: var(--cc-monthrow);
}

.contrib-days span:nth-child(1) { grid-row: 2; }
.contrib-days span:nth-child(2) { grid-row: 4; }
.contrib-days span:nth-child(3) { grid-row: 6; }

.contrib-cols {
  display: flex;
  flex-direction: column;
}

.contrib-months {
  display: grid;
  font-size: 10px;
  line-height: 1;
  color: #6c7086;
  height: var(--cc-monthrow);
  /* A label is wider than the 14px week it sits on, so it deliberately
     overflows to the right -- as GitHub's does. Months are >=3 columns
     apart here, so they never collide. */
  white-space: nowrap;
}

/* Column-flow is what makes each column a week: cells fill top-to-bottom
   through the 7 rows before starting the next column. */
.contrib-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--cc-size));
  grid-auto-columns: var(--cc-size);
}

.contrib-cell {
  width: var(--cc-cell);
  height: var(--cc-cell);
  border-radius: 2px;
  background: var(--cc-0);
  display: block;
}

.contrib-cell[data-level="1"] { background: var(--cc-1); }
.contrib-cell[data-level="2"] { background: var(--cc-2); }
.contrib-cell[data-level="3"] { background: var(--cc-3); }
.contrib-cell[data-level="4"] { background: var(--cc-4); }

/* Leading slots before the first real date -- they hold the grid's shape
   without pretending to be days with no activity. */
.contrib-cell--empty {
  background: transparent;
}

.contrib-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: #6c7086;
}

.contrib-legend {
  display: flex;
  align-items: center;
  gap: 3px;
}

.contrib-legend .contrib-cell {
  display: inline-block;
}

.contrib-legend .contrib-cell:first-of-type {
  margin-left: 4px;
}

.contrib-legend .contrib-cell:last-of-type {
  margin-right: 4px;
}

@media (max-width: 600px) {
  .contrib-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ── Resume ─────────────────────────────── */
.resume-section {
  margin-bottom: 30px;
}

.resume-section h3 {
  color: #cba6f7;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
  border-bottom: 1px solid #313244;
  padding-bottom: 6px;
}

.resume-entry {
  margin-bottom: 20px;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 3px;
}

.resume-title {
  color: #cdd6f4;
  font-weight: bold;
}

.resume-period {
  font-size: 13px;
  color: #6c7086;
  flex-shrink: 0;
}

.resume-org {
  color: #89b4fa;
  margin-bottom: 8px;
  font-size: 14px;
}

.resume-skills-label {
  font-size: 12px;
  color: #6c7086;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.resume-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.skill-tag {
  background: #313244;
  border: 1px solid #45475a;
  padding: 3px 10px;
  font-size: 13px;
  color: #cdd6f4;
}

.resume-download {
  margin-bottom: 22px;
  font-size: 14px;
  color: #6c7086;
}
