/* Video embed */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  border-radius: 0.5rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.7;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: #64748b;
  background-color: #ffffff;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1.25rem;
}

/* Header and Navigation */
.site-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.site-title {
  font-size: 1.425rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

.site-title:hover {
  color: #2563eb;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
  margin: 0;
}

.nav-menu a {  
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.075rem;
  transition: color 0.2s ease;
  position: relative;
  border-bottom: none;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #2563eb;
}

/* Main Content */
.page-content {
  padding: 3rem 0 4rem;
  min-height: calc(100vh - 200px);
  background-color: #ffffff;
}

.wrapper {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.5rem;
  margin-top: 0;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
}

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

p {
  margin-bottom: 1.25rem;
  color: #64748b;
  line-height: 1.75;
}

a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #bfdbfe;
  text-underline-offset: 4px;
  transition: all 0.2s ease;
  border-bottom: none;
}

a:hover {
  text-decoration-color: #2563eb;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: #64748b;
}

.content-meta {
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

/* Code */
code {
  background-color: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  color: #0f172a;
  border: none;
}

pre {
  background-color: #0f172a;
  color: #f1f5f9;
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2.5rem 0;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

pre code {
  background-color: transparent;
  padding: 0;
  border: none;
  color: #f1f5f9;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  background-color: #fafafa;
}

.footer-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

/* About/Bio Section */
.footer-about {
  max-width: 400px;
}

.footer-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.footer-bio {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-social a {
  color: #64748b;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  color: #0f172a;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* Links and Contact Sections */
.footer-links-section,
.footer-contact-section {
  display: flex;
  flex-direction: column;
}

.footer-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.25rem 0;
}

.footer-nav,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav li,
.footer-contact li {
  margin: 0;
}

.footer-nav a,
.footer-contact a {
  color: #64748b;
  font-size: 0.9375rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: #0f172a;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Home page intro */
.intro {
  margin-bottom: 4rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: inherit;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.intro-text {
  flex: 1 1 0;
  min-width: 0;
}

.intro-media {
  flex: 0 0 auto;
}

.intro-profile-image {
  width: 220px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  object-fit: cover;
  margin: 0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.intro h1 {
  color: #0f172a;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.intro h1 .highlight {
  color: #2563eb;
}

.intro p {
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1.75;
  max-width: 42rem;
}

.section-preview {
  margin-bottom: 4rem;
}

.section-preview h2 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-list {
  list-style: none;
  margin-left: 0;
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
}

.preview-list li {
  margin-bottom: 2rem;
  padding-bottom: 0;
  border-bottom: none;
  display: block;
  position: relative;
}

.preview-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.preview-list a {
  font-weight: 600;
  font-size: 1.125rem;
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.preview-list a:hover {
  color: #2563eb;
}

.preview-list .content-meta {
  display: block;
  margin-top: 0.75rem;
  color: #94a3b8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .footer-content-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-container {
    padding: 0 1.5rem;
  }
  
  .footer-about {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1.5rem;
  }

  .wrapper {
    padding: 0 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .intro h1 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.5rem;
    height: auto;
  }

  .nav-menu {
    gap: 1.25rem;
  }

  .wrapper {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.875rem;
  }

  .intro h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .intro p {
    font-size: 1.125rem;
  }

  /* Article cards on mobile */
  .article-card-link {
    padding: 1.25rem;
  }

  .article-title {
    font-size: 1.125rem;
  }
}

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

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Additional utility classes */
.view-all-link {
  display: inline-block;
  margin-top: 0;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 0;
  color: #2563eb;
  transition: color 0.2s ease;
  text-decoration: none;
}

.view-all-link:hover {
  color: #1d4ed8;
  background-color: transparent;
  transform: none;
  box-shadow: none;
  border-bottom-color: transparent;
}

.view-all-link::after {
  content: ' →';
}

.back-link {
  display: inline-block;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 0;
  color: #2563eb;
  transition: color 0.2s ease;
  text-decoration: none;
}

.back-link:hover {
  color: #1d4ed8;
  background-color: transparent;
  transform: none;
  box-shadow: none;
  border-bottom-color: transparent;
}

.back-link::before {
  content: '← ';
}

/* Article/Talk/Project specific styles */
.article-tags,
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag,
.tech-badge {
  background-color: #f1f5f9;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Talks card styling */
.talks-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.talk-card {
  background-color: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 0;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.talk-card:hover {
  border-color: #bfdbfe;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.talk-card-overlay-link {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}

.talk-card-header,
.talk-description {
  position: relative;
  z-index: 0;
}

.talk-card-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.talk-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.talk-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.talk-event {
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: block;
}

.talk-description {
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.talk-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

.talk-links a {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.talk-links a:hover {
  color: #2563eb;
}

/* Project card styling */
.project-card {
  background-color: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.project-card-link:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: fill;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
  display: block;
  margin: 0;
}

.project-card:hover .project-image {
  filter: grayscale(0%);
}

.project-content {
  padding: 1.5rem;
  flex: 1;
}

.project-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.project-description {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Articles list grid layout */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.article-item {
  margin: 0;
}

.article-card-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.article-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  border-color: #bfdbfe;
}

.article-card-link:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.article-date {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
  line-height: 1.4;
}

.article-excerpt {
  color: #64748b;
  line-height: 1.75;
  margin: 0;
  font-size: 1.125rem;
}

.article-cta {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-cta::after {
  content: '→';
  transition: transform 0.2s ease;
}

.article-card-link:hover .article-cta::after {
  transform: translateX(4px);
}

/* About page styling */
.about-content {
  max-width: 42rem;
}

.about-profile-image {
  width: 900px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 0 2rem 0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}
