@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400&family=PT+Sans:wght@400&display=swap');

/* ---------------------------------------- Base ---------------------------------------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; overflow-x: hidden; }

html {
  font-family: "PT Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.5;
}
@media (min-width: 38em) { html { font-size: 20px; } }

body {
  color: #515151;
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------- Type ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: #313131;
  letter-spacing: -.025rem;
  line-height: 1.25;
  margin-bottom: .5rem;
  text-rendering: optimizeLegibility;
}
h1 { font-size: 2rem; }
h2 { margin-top: 1rem; font-size: 1.5rem; }
h3 { margin-top: 1.5rem; font-size: 1.25rem; }
h4, h5, h6 { margin-top: 1rem; font-size: 1rem; }

p { margin-top: 0; margin-bottom: 1rem; }
strong { color: #303030; }

a { color: #0f766e; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

ul, ol, dl { margin-top: 0; margin-bottom: 1rem; }

hr {
  position: relative;
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #fff;
}

blockquote {
  padding: .5rem 1rem;
  margin: .8rem 0;
  color: #7a7a7a;
  border-left: .25rem solid #e5e5e5;
}
blockquote p:last-child { margin-bottom: 0; }

/* ---------------------------------------- Code ---------------------------------------- */
code, pre {
  font-family: Menlo, Monaco, "Courier New", monospace;
}
code {
  padding: .25em .5em;
  font-size: 85%;
  color: #bf616a;
  background-color: #f9f9f9;
  border-radius: 3px;
}
pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  font-size: .8rem;
  line-height: 1.4;
  white-space: pre;
  overflow-x: auto;
  background-color: #f9f9f9;
  border-radius: 4px;
}
pre code {
  padding: 0;
  font-size: 100%;
  color: inherit;
  background-color: transparent;
}

pre.mermaid {
  background: none;
  padding: 0.5rem 0;
  text-align: center;
}

/* ---------------------------------------- Tables ---------------------------------------- */
table {
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid #e5e5e5;
  border-collapse: collapse;
}
td, th { padding: .25rem .5rem; border: 1px solid #e5e5e5; }
tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th { background-color: #f9f9f9; }

/* ---------------------------------------- Container ---------------------------------------- */
.container {
  max-width: 28rem;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 38em) { .container { max-width: 32rem; } }
@media (min-width: 56em) { .container { max-width: 38rem; } }

/* ---------------------------------------- Masthead ---------------------------------------- */
.masthead {
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid #eee;
}
.masthead-title { margin: 0; color: #505050; }
.masthead-title a { color: #505050; }
.masthead-title a:hover { color: #0f766e; text-decoration: none; }
.masthead-title small {
  font-size: 75%;
  font-weight: 400;
  color: #c0c0c0;
  letter-spacing: 0;
}
@media (max-width: 48em) {
  .masthead-title { text-align: center; }
  .masthead-title small { display: none; }
}

/* ---------------------------------------- Posts ---------------------------------------- */
.page, .post { margin-bottom: 4em; }

.post-title { margin-top: 0; color: #303030; }
.post-title a { color: #303030; }

.post-date {
  display: block;
  margin-top: -.5rem;
  margin-bottom: 1rem;
  color: #9a9a9a;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

/* Home post list */
.posts { margin-top: 2rem; }

.post-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
}
.post-item .post-date {
  display: inline;
  margin: 0;
  white-space: nowrap;
  min-width: 5rem;
  color: #9a9a9a;
  font-size: 0.8rem;
}
.post-item a { color: #303030; }
.post-item a:hover { color: #0f766e; text-decoration: none; }

.intro { color: #515151; }

/* ---------------------------------------- Resume ---------------------------------------- */
.resume h2 {
  margin-top: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eee;
}

section.experience {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.left-column {
  min-width: 9rem;
  max-width: 9rem;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: #9a9a9a;
  padding-top: 0.15rem;
}
.left-column strong {
  display: block;
  color: #313131;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.left-column em { font-style: normal; display: block; }

.right-column { flex: 1; }
.right-column p { margin-bottom: 0.5rem; }
.right-column ul { margin-top: 0.25rem; padding-left: 1.2rem; }
.right-column li { margin-bottom: 0.3rem; font-size: 0.95rem; }
.right-column .tech {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #9a9a9a;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
}

.resume-contact {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ---------------------------------------- Sidebar ---------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -14rem;
  width: 14rem;
  visibility: hidden;
  overflow-y: auto;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  background-color: #202020;
  transition: all .3s ease-in-out;
}
.sidebar a { font-weight: normal; color: #fff; }
.sidebar-item { padding: 1rem; }
.sidebar-item p:last-child { margin-bottom: 0; }
.sidebar-nav { border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-nav-item {
  display: block;
  padding: .5rem 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-nav-item.active,
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus {
  text-decoration: none;
  background-color: rgba(255,255,255,.1);
  border-color: transparent;
}
a.sidebar-nav-item {
  cursor: pointer;
  pointer-events: all;
}

.sidebar-checkbox {
  position: absolute;
  opacity: 0;
  user-select: none;
}

.sidebar-toggle {
  position: fixed;
  top: .8rem;
  left: 1rem;
  z-index: 30;
  display: block;
  padding: .25rem .75rem;
  color: #505050;
  background-color: #fff;
  border-radius: .25rem;
  cursor: pointer;
}
.sidebar-toggle::before {
  display: inline-block;
  width: 1rem;
  height: .75rem;
  content: "";
  background-image: linear-gradient(to bottom, #555 20%, #fff 20%, #fff 40%, #555 40%, #555 60%, #fff 60%, #fff 80%, #555 80%);
}
.sidebar-toggle:active,
#sidebar-checkbox:checked ~ .sidebar-toggle {
  color: #fff;
  background-color: #555;
}
.sidebar-toggle:active::before,
#sidebar-checkbox:checked ~ .sidebar-toggle::before {
  background-image: linear-gradient(to bottom, #fff 20%, #555 20%, #555 40%, #fff 40%, #fff 60%, #555 60%, #555 80%, #fff 80%);
}

.wrap, .sidebar, .sidebar-toggle { backface-visibility: hidden; }
.wrap, .sidebar-toggle { transition: transform .3s ease-in-out; }

#sidebar-checkbox:checked + .sidebar { z-index: 20; visibility: visible; }
#sidebar-checkbox:checked ~ .sidebar,
#sidebar-checkbox:checked ~ .wrap,
#sidebar-checkbox:checked ~ .sidebar-toggle {
  transform: translateX(14rem);
}

/* Theme accent — deep teal */
.theme-base-08 .sidebar { background-color: #134e4a; }
.theme-base-08 .sidebar-toggle { color: #0f766e; }
.theme-base-08 #sidebar-checkbox:checked ~ .sidebar-toggle { background-color: #0f766e; color: #fff; }
.theme-base-08 a { color: #0f766e; }

/* ---------------------------------------- Dark mode ---------------------------------------- */
@media (prefers-color-scheme: dark) {
  body { color: #b1adac; background-color: #181515; }
  h1, h2, h3, h4, h5, h6 { color: #d1cccc; }
  strong { color: #d1cccc; }
  a { color: #2dd4bf; }
  a:hover { color: #5eead4; }
  .post-title, .post-title a { color: #d1cccc; }
  .post-item a { color: #d1cccc; }
  .masthead-title a { color: #b1adac; }
  .masthead { border-color: rgba(255,255,255,.15); }
  hr { border-top-color: rgba(255,255,255,.15); }
  code { color: #e06c75; background-color: #212529; }
  pre { background-color: #212529; }
  pre.mermaid { background: none; }
  td, th, table { border-color: rgba(255,255,255,.15); }
  tbody tr:nth-child(odd) td { background-color: #1e1b1b; }
  blockquote { color: #9a9a9a; border-left-color: rgba(255,255,255,.15); }
  .resume h2 { border-color: rgba(255,255,255,.15); }
  .left-column strong { color: #d1cccc; }
  .sidebar-toggle { color: #b1adac; background-color: #181515; }
  .sidebar-toggle::before {
    background-image: linear-gradient(to bottom, #b1adac 20%, #181515 20%, #181515 40%, #b1adac 40%, #b1adac 60%, #181515 60%, #181515 80%, #b1adac 80%);
  }
  .theme-base-08 a { color: #2dd4bf; }
}
