/* =============================================================================
  CORE
============================================================================= */

:root {
    --fg: #1a1a1a;
    --fg-muted: #999;
    --fg-gray: #64748b;
    --fg-dark-gray: #2d3748;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-size: 16px;
    --line-height: 1.6;
    --max-width: 1000px;
    --black: #111;
    --link-light-blue: #2563eb;
    --link-dark-blue: #1d4ed8;
    --bg-light-gray: #f8fafc;
    --border: #e2e8f0;
}

html {
  color: var(--fg);
  font-family: var(--font-body);
  line-height: var(--line-height);
  background-color: var(--bg);
  font-size: var(--font-size);
  height: 100%;
}

body {
  overflow-x: hidden;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 300;
  height: 100%;
}

@media (max-width: 768px) {
  body {
    padding: 0 1rem;
  }
}

#footer {
  margin-top: auto;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  color: var(--fg-gray);
  font-size: 0.875rem;
}

.container {
  max-width: 100%;
}

#black {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--black);
  overflow: hidden;
}

.box {
  padding: 1rem;
  border: 5px solid var(--black);
  margin-bottom: 1rem;
}

.icon svg {
  width: 20px;
  height: 20px;
}

.icon a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  text-decoration: none;
  color: var(--black);
  margin-right: 0.8rem;
}

/* =============================================================================
  TYPOGRAPHY
============================================================================= */

p {
  line-height: 1.8;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--fg-dark-gray);
  font-size: 1rem;
}

h1, h2, h3, h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--fg);
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.375rem;
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

li {
  margin-bottom: 0.75rem;
  color: var(--fg-dark-gray);
  font-size: 1rem;
}

a {
  color: var(--link-light-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-dark-blue);
  text-decoration: underline;
}

pre {
  background-color: var(--bg-light-gray);
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
}


/* =============================================================================
  MENU
============================================================================= */

.navbar {
  /* border-bottom: 10px solid var(--black); */
  border-bottom: 1px solid var(--black);
  color: var(--black);
}

.navbar .container {
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.navbar-brand {
  display: flex;
  margin-right: 1rem;
}

.navbar-brand a {
}
.navbar-brand a:hover {
  text-decoration: none;
}

.narbar-brand-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
  text-transform: none;
}

.navbar-menu {
  display: flex;
  height: 100%;
}

.navbar-start {
  display: flex;
  height: 100%;
}

.navbar-start .navbar-item {
  padding: 0 1rem;
  margin: 0;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.navbar-start .navbar-item {
  color: var(--black);
  transition: all 0.2s ease;
}

.navbar-start .navbar-item:hover {
  background-color: var(--bg-light-gray); 
  color: var(--link-light-blue);
  text-decoration: none;
}

@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }
  
  .navbar-menu {
    width: 100%;
  }
  
  .navbar-brand {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .navbar-start {
    flex-direction: column;
    width: 100%;
  }
  
  .navbar-start .navbar-item {
    padding: 0;
    padding-bottom: 0.5rem;
  }
  
  .navbar-start .navbar-item:last-child {
    border-bottom: none;
  }
}

/* =============================================================================
  CODE BLOCKS
============================================================================= */

pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
  line-height: 1.7;
}

.highlight {
  margin: 1.5rem 0;
  border-radius: 0.375rem;
  background-color: var(--bg-light-gray);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.highlight pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: none;
  border: none;
}

.highlight code {
  display: block;
  overflow-x: auto;
  white-space: pre;
  background: none;
  border: none;
}

.highlight .lnt,
.highlight .ln {
  display: none;
}

.highlight .lntable {
  display: block;
  width: 100%;
  overflow-x: auto;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
}

.highlight .lntd {
  display: block;
  padding: 0;
  background: none;
  border: none;
}

.highlight .lntd:first-child {
  display: none;
}

.highlight .lntd:last-child {
  width: 100%;
  overflow-x: auto;
}

/* =============================================================================
  BLOG
============================================================================= */

#index-main {
  height: 100%;
}

#index-block {
  width: 45%;
  margin-right: 1rem;
  float: left;
  height: 100%;
  background-color: var(--black);
}

/* =============================================================================
  MEDIA
============================================================================= */

@media (max-width: 600px) {
  main .book-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  main .book-section img {
    width: 80px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .portrait-image {
    width: 240px;
    height: 240px;
  }
}

/* =============================================================================
  PUBLICATIONS
============================================================================= */

main .publications-section {
  margin-bottom: 2.5rem;
}

main .publications-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

main .publications-section p {
  color: var(--fg-gray);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

main .publications-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

main .publications-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

main .publications-list .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--fg-gray);
}

main .publications-list a {
  color: #1a1a1a;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 1rem;
}

main .publications-list a:hover {
  color: var(--link-light-blue);
  text-decoration: underline;
}

main .publications-list .source {
  font-style: italic;
}

main .publications-list .date {
  text-align: right;
}

/* =============================================================================
  BLOG
============================================================================= */

.latest-posts {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.latest-posts h2 {
  font-size: 1.375rem;
  margin-bottom: 1.25rem;
}

.post-preview {
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.post-preview:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.post-date {
  font-size: 0.875rem;
  color: var(--fg-gray);
  margin-bottom: 0.25rem;
}

.post-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  line-height: 1.4;
}

.post-title:hover {
  color: var(--link-light-blue);
  text-decoration: underline;
}

.button,
.pagination-previous,
.pagination-next {
  color: var(--fg-gray);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 15px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.button:hover,
.pagination-previous:hover,
.pagination-next:hover {
  color: var(--link-light-blue);
  text-decoration: none;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
