@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background: #fff;
}

.top-nav,
.bottom-nav {
  background: #f5f5f5;
  height: 50px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

@media (max-width: 680px) {
  .top-nav,
  .bottom-nav {
    padding: 0 1.25rem;
  }
}

.top-nav p,
.bottom-nav p {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.top-nav > p > a,
.bottom-nav > p > a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;
  margin: 0 -1.5rem;
}

.top-nav > p > a:hover,
.bottom-nav > p > a:hover {
  color: #0066cc;
  background: #efefef;
}

.container {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .container {
    margin: 2rem auto;
    padding: 0 1.25rem;
  }

  body {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  body {
    font-size: 15px;
  }

  .top-nav,
  .bottom-nav {
    height: 45px;
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .top-nav > p > a,
  .bottom-nav > p > a {
    padding: 0 1rem;
    margin: 0 -1rem;
  }

  .site-footer {
    padding: 1.5rem 1rem;
  }
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #111;
}

h1 {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 1rem 0;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

.profile-image {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 0.75rem auto;
  border-radius: 50%;
  object-fit: cover;
}

.site-header {
  margin-bottom: 3rem;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.site-header:has(.profile-image) {
  text-align: center;
}

.site-header:has(.profile-image) .header-tools {
  justify-content: flex-end;
}

.site-footer {
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.5rem;
  max-width: 680px;
}

@media (max-width: 680px) {
  .site-footer {
    padding: 2rem 1.25rem;
  }
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.linkedin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  opacity: 0.7;
}

.linkedin-icon:hover {
  opacity: 1;
}

.linkedin-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(1) hue-rotate(210deg) saturate(1.5) brightness(0.9);
}

.footer-separator {
  color: #ccc;
}

.footer-resume {
  display: inline-flex;
  align-items: center;
}

.footer-resume-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #666;
  background: #fff;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-resume-link:hover {
  color: #0066cc;
  border-color: #cfcfcf;
  background: #f7f7f7;
  text-decoration: none;
}

.footer-resume-link svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  align-self: center;
  padding: 0.25rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #666;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.language-switcher a:hover {
  color: #0066cc;
  text-decoration: none;
}

.language-switcher a.is-active {
  background: #111;
  color: #fff;
}

.content {
  flex: 1;
}

.content ul {
  padding-left: 1.5rem;
  list-style-position: outside;
}

.content li {
  margin-bottom: 0.75rem;
}

.content-disclaimer {
  margin-top: 1.5rem;
  padding-left: 0.9rem;
  border-left: 2px solid #e7e1d6;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #7d7d7d;
}

.post-title {
  margin: 1.5rem 0 0.35rem 0;
  font-size: 1.75rem;
}

.post-tldr {
  margin: 0 0 0.45rem 0;
  font-size: 0.88rem;
  color: #777;
  line-height: 1.45;
}

.post-meta {
  margin: 0 0 2rem 0;
  font-size: 0.9rem;
  color: #777;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  line-height: 1.4;
}

.post-meta time {
  color: #666;
  font-variant-numeric: tabular-nums;
}

.post-meta .sep {
  margin: 0;
  color: #d6d6d6;
}

.post-meta > span:last-child {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6f6f6f;
  white-space: nowrap;
}

.home-writing {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e5e5;
}

.home-writing-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-label {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: #111;
  margin: 0;
}

.view-all {
  font-size: 0.9rem;
  color: #888;
  font-weight: 400;
}

.view-all:hover {
  color: #0066cc;
  text-decoration: underline;
}

.home-featured {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.home-featured:hover {
  border-color: #ddd;
}

.home-featured img {
  display: block;
  width: 200px;
  flex-shrink: 0;
  height: auto;
  border-radius: 6px;
}

.home-featured h3 {
  font-size: 1.3rem;
  font-weight: 500;
  color: #111;
  margin: 0;
  padding-top: 0.15rem;
  transition: color 0.2s;
}

.home-featured:hover h3 {
  color: #0066cc;
}

.home-featured-summary {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 0.5rem 0 0 0;
}

.home-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #f0f0f0;
}

.home-list li {
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.home-list a {
  display: block;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s, padding-left 0.2s;
}

.home-list a:hover {
  color: #0066cc;
  padding-left: 0.25rem;
  text-decoration: none;
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.writing-grid-single {
  grid-template-columns: 1fr;
  max-width: 320px;
}

.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.article-card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.article-card-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.article-card-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  color: #0066cc;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
}

.article-card:hover .article-card-title {
  color: #0052a3;
  text-decoration: underline;
}

.article-image {
  display: block;
  height: auto;
  max-height: 350px;
  margin: 0 auto 2rem auto;
  border-radius: 4px;
}

.article-signature {
  text-align: right;
  margin-top: 3rem;
  font-size: 0.95rem;
  color: #666;
}

@media (max-width: 768px) {
  .writing-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .article-card-title {
    font-size: 1rem;
  }

  .site-header {
    margin-bottom: 2rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .home-featured h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
  }

  h2 {
    font-size: 1rem;
    margin-top: 1.5rem;
  }

  .kicker {
    font-size: 0.9rem;
  }

  .post-title {
    font-size: 1.3rem;
  }

  .post-meta {
    font-size: 0.9rem;
  }

  .article-card-image {
    margin-bottom: 0.75rem;
  }

  .article-card-title {
    font-size: 0.95rem;
  }

  .site-header {
    margin-bottom: 1.5rem;
  }

  .site-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .home-writing {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .home-featured {
    flex-direction: column;
    padding: 1rem;
  }

  .home-featured img {
    width: 100%;
    max-width: 280px;
  }

  .home-featured h3 {
    font-size: 1.1rem;
    padding-top: 0;
  }

  .section-label {
    font-size: 1.2rem;
  }

  .language-switcher {
    padding: 0.2rem;
  }

  .language-switcher a {
    min-width: 2rem;
    padding: 0.25rem 0.55rem;
  }
}
