html {
  scroll-padding-top: 50px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    text-decoration: none;
    font-size: 14px;
}

p {
    text-align: justify;
    text-justify: inter-word;
    font-size: 16px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(246, 246, 246, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 12px 24px;
    font-family: sans-serif;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.username {
    font-weight: bold;
    color: black;
}

.header-links a {
    color: #555;
    text-decoration: none;
    margin-left: 16px;
    font-size: 14px;
}

.header-links a:hover {
    color: #222
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.main-container {
    display: flex;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100vh;
    align-items: flex-start;
}

.sidebar {
    position: sticky;
    padding: 15px;
    margin-right: 20px;
    margin-top: 10px;
    width: 250px;
    box-sizing: border-box;
    top: 70px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}

.sidebar h3 {
    margin-top: 0;
    font-size: 14px;
    font-weight: bold;
}

.sidebar hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 5px 0 10px 0;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-links a {
    text-decoration: none;
    font-size: 14px;
    color: #555
}

.sidebar-links a:hover {
    color: black;
}

.content {
    flex-grow: 1;
    min-height: 100vh;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 500px) {
    .content {
        margin: 0 10px;
    }
}

.section {
    display: flex;
    flex-direction: column;
}

.section hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0 0 10px 0;
    width: 100%;
}

.section-content {
    margin-top: 10px;
    margin-bottom: 10px;
}

.content-center {
    display: flex;
    justify-content: center;
}

/* About */

.user-link {
    text-decoration: none;
    cursor: pointer;
    color: #555;
}

.user-link:hover {
    color: black;
}

.resume-link i {
    margin-left: 5px;
}

.resume-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

/* posts */

.posts-link i {
    margin-left: 5px;
}

.posts-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

/* library */

.library-link i {
    margin-left: 5px;
}

.library-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.library-link i {
    margin-left: 5px;
}

/* sites */

.sites-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.site-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.site-link i {
    margin-left: 5px;
}

/* downloads */

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 400px;
    margin-top: 10px;
}

.grid-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 12px;
    background-color: white;
    border-radius: 15px;
    border: 1px solid #ccc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    z-index: 1;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    z-index: 2;
    pointer-events: none;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    padding: 0 10px;
    width: 90%;
    z-index: 3;
}

.grid-link:hover .grid-overlay {
    opacity: 1;
}

.grid-link:hover .overlay-text {
    opacity: 1;
}

/* stats */

.reference-link {
    margin-left: 5px;
    text-decoration: none;
    cursor: pointer;
}

.reference-link:hover {
    color: black;
}

.stats-content {
    padding: 0 20px;
    box-sizing: border-box;
}

.github-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.github-stats img {
  width: 70%;
  height: auto;
  object-fit: contain;
  display: block;
  max-width: 100%;
}


@media (max-width: 768px) {
    .github-stats img {
        width: 90%;
    }
}

/* publications */

.pub-list {
    padding-right: 40px;
}

.pub-item-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

/* footer */

.footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #f8f9fa;
    padding: 20px;
    font-family: sans-serif;
}

.footer-left,
.footer-right {
    padding: 20px;
    box-sizing: border-box;
}

.footer-left {
    width: 60%;
}

.footer-right {
    width: 40%;
}

.footer-left h1,
.footer-right h1 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #444;
}

.footer-left hr,
.footer-right hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0 0 10px 0;
    width: 100%;
}

.footer-left p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    transition: opacity 0.3s;
    cursor: pointer;
    background-color: white;
    border-radius: 8px;
}

.social-icons a img:hover {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer {
    flex-wrap: wrap;
    }

    .footer-left,
    .footer-right {
    width: 100%;
    }
}