/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
  --icon-size: 30px;
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 32px;
}

h3 {
    font-size: 24px;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    font-family: var(--font-family);
    font-weight: 600;

}

a {
    text-decoration: none !important;
    opacity: 0.7;
    transition: background-size 0.3s ease;
    color: var(--links-color);
}

a.site-title{
    font-size: 24px;
}

@media (max-width: 768px){
    a.site-title {
        font-size: 16px;
    }
}

a:hover {
     opacity: 1;
}

/* Top navigation bar */
.top-nav {
    display: flex;
    position: static;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--background-color);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    top: 0px;
    width: 100%;

}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}


.site-title {
    font-style: normal;
    text-decoration: none;
    font-weight: 700;
    color: inherit;

}

.site-title:visited {
    color: inherit;
}

.footnotes hr {
    border-top: none;
    border-bottom: none;
    border-left: none;
    padding-top: 1rem;
}

blockquote {
  margin-bottom: 1.2rem;  
  border-left: 10px solid var(--table-header-color);
  padding: 1em;
  background: var(--table-content-color);
}

@media (max-width: 400px) {
    .nav-links {
        gap: 1rem;
    }
}

.logo {
    font-weight: bold;
    color: #000000  ;
    text-decoration: none;
    margin-right: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 600;
    transition: background-size 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
}

/* Main content for the Homepage */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 2rem;
}

.homepage-columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left column - profile */
.left-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--background-color);
  max-width: 100%;
}

.profile-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 100%;
  margin: 0 auto 1rem;
}

.profile-description {
  max-width: 100%;
  line-height: 1.6;
  text-align: center;
  margin: 0 auto;
}

.profile-description pre {
  display: inline-block;
  text-align: left;
  max-width: 100%;
}

.profile-description code {
  display: inline-block;
  text-align: left;
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

.profile-description p{
      display: inline-block;
      text-align: center;
}

.photo-error {
  color: red;
  padding: 1rem;
  border: 2px dashed red;
  text-align: center;
  margin: 1rem auto;
  max-width: 200px;
}

/* Right column styles */
.right-column{

}

.year-heading-homepage {
  margin: 0rem 0 0rem;
  color: var(--text-color);

}

.post-list-homepage {
  list-style: none;
  padding: 0;

}

.post-item-homepage {
  display: flex;
  justify-content: space-between;
  align-items: baseline;

}

.post-title-wrapper {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 0;
    line-height: 0;
}

.post-title-homepage-link {
  flex-grow: 1;
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.8;
  transition: background-size 0.3s ease;
}

.post-title-homepage-link:hover {
  opacity: 1;
}

.post-date-homepage {
  white-space: nowrap;
  color: var(--text-color);
  opacity: 0.75;

}
.dot-leader {
    border-bottom: 4px dotted var(--text-color);
    flex-grow: 1;
    height: 1.45rem;
    margin-left: 10px;
    margin-right: 10px;
    color: var(--text-color);
    opacity: 0.7;
}

.all-posts-link-homepage {
     text-align: right;
}
.all-posts-link-homepage a{
     color: var(--links-color);
     opacity: 0.7;
     text-decoration: none;
     transition: background-size 0.3s ease;
}

.all-posts-link-homepage a:hover {
     opacity: 1;
}


@media (max-width: 768px) {
  .homepage-columns {
    grid-template-columns: 1fr;
  }
  .profile-container {
    position: static;
    margin-bottom: 2rem;
  }
  .post-item-homepage {
    display: block;
  }
  .dot-leader {
    display: none;
  }
  .post-title-homepage {
    display: block;
    margin-bottom: 0px;
  }
  .post-date-homepage {
    display: block;
    margin-top: 0px;
    margin-bottom: 5px;
  }

  .post-title-homepage {
     margin-bottom: 0;
  }
}

/* Posts list page */
.posts-list-container {
  max-width: 75%;
  margin: 0 auto;
}

.year-group  {
  margin: 0rem auto;
  color: var(--text-color);
}

.post-list {
  list-style: none;
  margin: auto;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.post-title {
  flex-grow: 1;
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.8;
  transition: background-size 0.3s ease;
}


.post-title:hover {
  opacity: 1;
}

.post-date {
  color: var(--text-color);
  white-space: nowrap;
  opacity: 0.75;
}

@media (max-width: 768px) {
  .posts-list-container {
    max-width: 85%;
    margin: 0 auto;
  }


  .post-item {
    display: block;
    flex-wrap: wrap;
    align-items: baseline;
  }

  .post-title {
    display: block;
    margin-bottom: 0px;
  }

  .post-date {
    display: block;
    margin-top: 0px;
    margin-bottom: 5px;
  }

  .post-list .post-separator {
    display: none;
  }

  .post-list .post-item::after {
    content: "";
    display: block;
    width: 100%;
  }
}

/* Single Post Styling */
.single-post {
  padding: 2rem 0;
  max-width: 75%;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 1rem;
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

.post-meta {
  color: color-mix(in srgb, var(--text-color) 66%, transparent);
}

.post-content {
  line-height: 1.6;
  max-width: 100%;
}


.post-content p{
    padding: 0.5 rem;
    margin-bottom: 1.2rem;
}

.post-content blockquote p{
  margin-bottom: 0px;
}

.highlight {
  margin-bottom: 1.2rem;
}

.post-content li {
    background: var(--background-color);
}
.post-content ul,
.post-content ol {
    background: var(--background-color);
    padding-left: 2rem;

}

.post-content p img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

body .post-content table {
  border-collapse: collapse;
  width: 100%;
  display: table;
  margin: 1rem 0;
  table-layout: auto;
}

.post-content th,
.post-content td {
  padding: 0.5rem;
  text-align: center;
  background-color: var(--table-content-color);
}

.post-content tr:hover td {
  background-color: var(--table-row-hover-color);
}

@media (max-width: 768px) {
  .single-post {
    max-width: 100%;
    margin: 0 auto;
  }

  .post-header h1 {
    line-height: 1.3;
  }

  .post-meta {
    margin-bottom: 1rem;
  }

  .post-content {
    line-height: 1.6;
  }
}


.post-content {
  overflow-wrap: break-word;
  hyphens: auto;
}

.post-content iframe,
.post-content embed {
  max-width: 100%;
}

/* Table Header */
.post-content thead th {
  background-color: var(--table-header-color);
  font-weight: 800;
}

.post-content table {
  display: table;
  max-width: 100%;
  overflow-x: auto;
}

/* Code blocks */
.post-content pre {
    background: #272822;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-weight: 100;
    font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New;
}

.inline {
   background-color: #272822;
   color:#f8f8f2;
   padding: 0.2rem;
   border-radius: 2px;
   font-weight: 100;
   font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New;
}

/* Writings Page Layout */
.writings-container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
}

.writings-header {
  text-align: center;
  margin-bottom: 1rem;
}

.writings-header h1 {
    font-weight: 600;
}

/* Horizontal Columns */
.writings-columns {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.writing-column {
  flex: 1;
  background: var(--writing-card-background);
  border-radius: 10px;
  padding: 1.5rem;
  min-width: 0;
}

.column-title {
  margin-bottom: 0.5rem;
  position: static;
  top: 0;
  background: var(--writing-card-background);
  text-align: center;
  z-index: 1;
}


.writing-item {
  padding-bottom: 0.5rem;
}

.writing-item:last-child {
  border-bottom: none;
}

.writing-title {
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.writing-title a {
  color: inherit;
  text-decoration: none;
}

.writing-title a:hover {
  text-decoration: underline;
}

.writing-meta {
  color: color-mix(in srgb, var(--text-color) 66%, transparent);
  margin-bottom: 0.25rem;
  display: flex;
  gap: 0.75rem;
}

.writing-tags {
  color: color-mix(in srgb, var(--text-color) 66%, transparent);
}

.writing-excerpt {
  line-height: 1.5;
  color: color-mix(in srgb, var(--text-color) 88%, transparent);
}

@media (max-width: 1200px) {
  .writings-columns {
    flex-wrap: wrap;
  }
  .writing-column {
    flex: 1 1 calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .writing-column {
    flex: 1 1 100%;
  }

}

/* Photos page */
.photos-container {
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
}

.photo-section {
  flex: 1.5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--background-color);
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.photo-section img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}

.photo-controls {
  position: sticky;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}

.nav-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-button img {
  width: 40px;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-button img:hover {
  opacity: 1;
}





.info-section {
  flex: 1;
  flex-direction: column;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: var(--background-color);
  display: flex;

}

.info-content {
  text-align: center;
}

#nav-next button {
    width: 100px;
    height: 50px;
}

#description {
  margin-top: 1rem;
  margin-bottom: 2rem;
  margin-left: 2rem;
  margin-right: 2rem;
}

#counter {
  height: 50%;
}

#albums {
  list-style: none;
  padding: 0;
  margin: 0;
}

#albums li {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#albums li img {
  width: 20px;
  height: 20px;
}

.album-link {
  text-decoration: none;
  color: inherit;
}

.album-link.active {
  color: var(--links-color);
  font-weight: 700;
}

.album-link.active img {
  filter: invert(39%) sepia(11%) saturate(1743%) hue-rotate(243deg) brightness(94%) contrast(88%);
}

@media (max-width: 768px) {
  .photos-container {
    flex-direction: column;
  }

  .photo-section,
  .info-section {
    width: 100%;
    height: auto;
  }

  .photo-section img {
    max-width: 100%;
    max-height: 60vh;
  }
}

@media (max-width: 768px) {
    .two-column {
        flex-direction: column;
    }
    
    .top-nav, .nav-links {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Footer Structure */
.site-footer {
  text-align: center;
  display: flex;
  background-color: var(--background-color);
  padding: 1rem 1rem;
  box-sizing: border-box;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links a {
  opacity: 0.7;
  transition: background-size 0.3s ease;
  color: var(--background-color);
  text-decoration: none;
  padding: 0.5rem;
  white-space: nowrap;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .site-footer {
    padding: 1rem;
  }

  .footer-links {
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .footer-links a {
    white-space: normal;
    text-align: center;
    padding: 0.5rem;
  }
}

/* Icons */
.icon {
  display: inline-block;
  width: var(--icon-size);
  height: var(--icon-size);
  background-color: var(--text-color); 
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.github-icon {
  mask-image: url('/icons/github.svg');
  -webkit-mask-image: url('/icons/github.svg');
}

.email-icon {
  mask-image: url('/icons/mail.svg');
  -webkit-mask-image: url('/icons/mail.svg');
}

.linkedin-icon {
  mask-image: url('/icons/linkedin.svg');
  -webkit-mask-image: url('/icons/linkedin.svg');
}

.pinterest-icon {
  mask-image: url('/icons/pinterest.svg');
  -webkit-mask-image: url('/icons/pinterest.svg');
}

.cv-icon {
  mask-image: url('/icons/file-text.svg');
  -webkit-mask-image: url('/icons/file-text.svg');
}