html {
    font-size: clamp(14px, 1.2vw, 18px);
}

html.dark {
    background: #11161D;
    color: #fff;
}
body { margin: 0; }
.overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle farthest-corner at bottom right,
        rgba(64, 209, 137, 0.20) 0%,
        rgba(17, 22, 29, 0.9) 60%
    );
    z-index: -1;
}
main {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}
.fade-in { animation: fadeIn 0.8s ease-out forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }
.fade-in-sidebar { animation: fadeInSidebar 0.8s ease-out forwards; opacity: 0; }
@keyframes fadeInSidebar { to { opacity: 0.5; } }
.fade-out { animation: fadeOut 0.8s ease-out forwards; }
@keyframes fadeOut { to { opacity: 0; } }
#sidebar p { opacity: 0; }
#subtitle { opacity: 1; transition: opacity 0.1s linear; white-space: nowrap; }
.subtitle-part {
    display: inline-block;
    margin-right: 1rem;
    transform-origin: top left;
}
.console-message {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #4ade80;
}
.console-message .console-link {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0 0.25rem;
  border-radius: 0.25rem;
  color: #fff;
  text-decoration: none;
  margin: 0 0.5rem;
}
@keyframes blink {
  50% { opacity: 0; }
}
.cursor {
  display: inline-block;
  margin-left: 1rem;
  width: 0.5ch;
  animation: blink 1s step-end infinite;
}
.glass-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.glass-button {
  background-color: rgba(17, 22, 29, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive tweaks */
#logo,
#profile-photo {
    width: clamp(8rem, 20vw, 12rem);
    height: clamp(8rem, 20vw, 12rem);
}

main {
    padding: clamp(1rem, 4vw, 1.5rem);
}

#cards {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    width: min(100%, 80rem);
    margin-inline: auto;
}

@media (min-width: 640px) {
    #cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

#blog-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    width: min(100%, 72rem);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    justify-items: stretch;
}

#layout {
    width: 100%;
}

@media (min-width: 768px) {
    #layout {
        display: grid;
        grid-template-columns: 18vw 1fr;
        gap: 2rem;
    }
    #sidebar {
        width: 18vw;
        left: 0;
    }
    #cards {
        grid-column: 2;
    }
}

#logo {
    /* Start slightly higher on the page */
    margin-top: clamp(1rem, 4vh, 5rem);
    margin-bottom: clamp(1rem, 4vh, 2rem);
}

#title {
    margin-bottom: clamp(1rem, 3vh, 2rem);
    transform-origin: top left;
}

@media (max-width: 862px) {
    #sidebar {
        display: none !important;
    }
    #layout {
        display: block !important;
    }
}

@media (max-width: 639px) {
    #subtitle {
        white-space: normal;
        text-align: center;
    }
    .subtitle-part {
        display: block;
        margin-right: 0;
    }
    #logo,
    #profile-photo {
        width: 16rem;
        height: 16rem;
    }
    #title {
        font-size: 3.75rem;
        line-height: 1;
    }
}
