*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  background: #FFFAF5;
  font-size: 14px;
  box-sizing: border-box;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: .5rem 1rem 1rem;
  border: 1px solid #888;
  box-shadow: 2px 2px #ccc;
  background: #fff;
  font-family: 'Times New Roman', Times, serif;
  font-weight: normal;
  overflow-x: hidden;
  color: #000;
  text-rendering: optimizeLegibility;
  font-size: 1rem;
}

a {
  color: #5755d9;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #302ecd;
  text-decoration: underline;
}

a:visited {
  color: #807fe2;
}

h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-weight: normal;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.85rem; }

p {
  margin: 0.9rem 0;
}

ul, ol {
  margin: 0.8rem 0;
  padding-left: 1.5rem;
}

li {
  margin-top: 0.35rem;
}

blockquote {
  border-left: 3px solid #888;
  background-color: #fafafa;
  margin: 1rem 0;
  padding: 0.6rem 1rem;
}

blockquote > p:first-child {
  margin-top: 0;
}

blockquote > p:last-child {
  margin-bottom: 0;
}

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

.page-centered {
  display: block;
  float: none;
  margin-right: auto;
  margin-left: auto;
  max-width: 60rem;
}

header h2 {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

nav {
  display: block;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav li {
  flex: 1;
  display: block;
  margin: 0;
  min-width: 0;
}

nav .nav-btn,
nav .nav-btn:visited {
  display: inline-block;
  width: 100%;
  color: #333;
  padding: 0.5rem 1rem;
  border: 1px solid #000;
  box-shadow: 2px 2px #bbb;
  text-align: center;
  text-decoration: none;
  line-height: 1rem;
}

nav .nav-btn:hover,
nav .nav-btn:focus {
  background-color: #000;
  color: #fff;
  text-decoration: none;
  box-shadow: 2px 2px #bbb;
}

.columns {
  display: flex;
  gap: 1rem;
}

.column {
  flex: 1;
  min-width: 0;
}

.flex-measure-36 {
  flex: 0 0 50%;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
  nav li {
    flex: 1 1 calc(50% - 0.4rem);
  }

  .content-section.columns {
    flex-direction: column;
  }

  .content-section.columns .column {
    width: 100%;
  }

  .info-table {
    table-layout: auto;
  }

  .info-table td {
    word-break: break-word;
  }
}

.page-title {
  font-weight: bold;
  text-align: center;
  margin: 1rem 0;
}

.blog-content {
  margin: 1rem 0;
}

.blog-post .page-title {
  font-size: 1.85rem;
  margin-bottom: 0.35rem;
}

.blog-post .post-date {
  text-align: center;
  margin: 0 0 1rem 0;
}

.blog-post .blog-content {
  font-size: 1.1rem;
  line-height: 1.6;
}

.blog-post .blog-content > :first-child {
  margin-top: 0;
}

.blog-post .blog-content > :last-child {
  margin-bottom: 0;
}

.blog-post .blog-content h1,
.blog-post .blog-content h2,
.blog-post .blog-content h3,
.blog-post .blog-content h4,
.blog-post .blog-content h5,
.blog-post .blog-content h6 {
  font-weight: bold;
  line-height: 1.25;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

.blog-post .blog-content h1 {
  font-size: 1.45rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #ddd;
}

.blog-post .blog-content h2 {
  font-size: 1.25rem;
}

.blog-post .blog-content h3 {
  font-size: 1.1rem;
}

.blog-post .blog-content h4 {
  font-size: 1rem;
}

.blog-post .blog-content h1 + h2,
.blog-post .blog-content h2 + h3,
.blog-post .blog-content h3 + h4 {
  margin-top: 1rem;
}

.blog-post .blog-content p {
  margin: 0.85rem 0;
}

.blog-post .blog-content ul,
.blog-post .blog-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.blog-post .blog-content li {
  margin: 0.35rem 0;
}

.blog-post .blog-content li > p {
  margin: 0.45rem 0;
}

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

.blog-post .blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.blog-post .blog-content th,
.blog-post .blog-content td {
  border: 1px solid #ddd;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.blog-post .blog-content th {
  background-color: #f0f0f0;
  font-weight: bold;
}

.text-box {
  padding: 1rem;
  border: 1px solid #ccc;
  box-shadow: 2px 2px #bbb;
  background-color: #fff;
}

.text-box > :first-child {
  margin-top: 0;
}

.text-box > :last-child {
  margin-bottom: 0;
}

.image-box {
  padding: 1rem;
  border: 1px solid #ccc;
  box-shadow: 2px 2px #bbb;
  background-color: #fff;
  text-align: center;
}

.image-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.image-box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 0.1rem solid #ddd;
}

.info-table th {
  padding: 0.3rem 0.6rem;
  border-bottom: 0.1rem solid #ddd;
  text-align: left;
  vertical-align: top;
  background-color: #f0f0f0;
  font-weight: bold;
}

.info-table td {
  padding: 0.2rem 0.6rem;
  overflow-wrap: break-word;
}

.sm-icon {
  width: 1em;
}

.active-icon {
  display: inline-block; 
  width: 1em; 
  height: 1em; 
  border: 0.1em solid #000; 
  border-radius: 50%; 
  background: #ff4136;
  float: right;
}

.p-centered {
  display: block;
  float: none;
  margin-right: auto;
  margin-left: auto;
}

.w100 {
  width: 100%;
}

.mr2 {
  margin-right: 0.4rem;
}

.divider {
  border-bottom: 1px solid #ddd;
  margin: 1rem 0;
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.blog-post-preview {
  padding: 1.5rem;
  border: 1px solid #ccc;
  box-shadow: 2px 2px #bbb;
  background-color: #fff;
}

.blog-post-preview h3 {
  margin: 0 0 0.5rem 0;
  font-weight: bold;
}

.blog-post-preview h3 a {
  color: #333;
  text-decoration: none;
}

.blog-post-preview h3 a:hover {
  color: #000;
  text-decoration: underline;
}

.blog-post {
  max-width: 100%;
}

.post-title, .post-date {
  font-size: 0.9rem;
}

.post-date {
  color: #666;
  font-style: italic;
}

.post-taxonomies {
  padding: 0.5rem;
}

.post-taxonomies p {
  margin: 0.5rem 0;
}

.post-taxonomies a {
  color: #333;
  text-decoration: underline;
}

.post-taxonomies a:hover {
  color: #000;
}

.post-navigation {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.content-section {
  margin: 1rem 0;
}

/* Code block styling */
pre {
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  line-height: 1.45;
  border: 1px solid #ccc;
  box-shadow: 2px 2px #bbb;
  background-color: #1d2021;
  color: #ebdbb2;
  margin: 1rem 0;
}

pre code {
  display: block;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  border: none;
  border-radius: 0;
  font-size: 0.88rem;
  line-height: inherit;
}

/* Line numbers support */
pre[data-linenos] {
  padding: 1rem 0;
}

pre table td {
  padding: 0;
}

pre table {
  width: 100%;
  border-collapse: collapse;
}

pre table td:nth-of-type(1) {
  text-align: center;
  user-select: none;
  padding: 0 0.5rem;
}

/* Highlighted lines */
pre mark {
  display: block;
  background-color: rgba(254, 252, 232, 0.9);
}

code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 0.88em;
}

/* Inline code */
:not(pre) > code {
  background-color: #f0f0f0;
  border: 1px solid #e2e2e2;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  color: #222;
}

/* Resume */
.resume {
  max-width: 100%;
}

.resume-header {
  border: 1px solid #000;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.resume-name {
  font-weight: bold;
  font-size: 1.2rem;
}

.resume-title {
  color: #555;
}

.resume-links {
  font-size: 0.85rem;
}

.resume-links a {
  color: #333;
}

.resume-section-title {
  margin: 1.5rem 0 0 0;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #000;
  padding-bottom: 0.3rem;
}

.resume-entry {
  margin: 1rem 0;
  padding-left: 0.5rem;
  border-left: 2px solid #ddd;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

.resume-date {
  color: #666;
  font-size: 0.85rem;
}

.resume-entry-sub {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.resume-entry-sub a {
  color: #333;
}

.resume-entry ul {
  margin: 0.4rem 0;
  padding-left: 1.5rem;
}

.resume-entry li {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.resume-skills {
  margin-top: 0.8rem;
}

.resume-skill-row {
  display: flex;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #eee;
}

.resume-skill-row:last-child {
  border-bottom: none;
}

.resume-skill-label {
  font-weight: bold;
  min-width: 8rem;
  font-size: 0.85rem;
}

.resume-skill-value {
  font-size: 0.85rem;
  color: #333;
}

.resume-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #000;
  text-align: center;
  font-size: 0.9rem;
}

.resume-footer a {
  color: #333;
  font-weight: bold;
}

/* About page */
.about-grid {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.about-card {
  flex: 1;
  min-width: 14rem;
  border: 1px solid #ccc;
  box-shadow: 2px 2px #bbb;
  background-color: #fff;
  padding: 1rem;
}

.about-card-header {
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #000;
  margin-bottom: 0;
}

.about-card .info-table {
  border: none;
}

/* Now section */
.now-section {
  margin-top: 2rem;
}

.now-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #000;
  margin: 0 0 1rem 0;
}

.now-content {
  padding: 1rem;
  border: 1px solid #ccc;
  box-shadow: 2px 2px #bbb;
  background-color: #fff;
}

.now-content p {
  margin: 0.5rem 0;
}

.now-content ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0 0 0;
}

.now-content > *:last-child {
  margin-bottom: 0;
}

.now-explanation {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
}

.now-explanation a {
  color: #666;
}
