:root {
  --gray-0: #fbfbfb;
  --gray-1: #eee;
  --gray-2: #e4e4e7;
  --gray-3: #d4d4d8;
  --gray-4: #c8c8cf;
  --gray-5: #a1a1a8;
  --gray-6: #4e4e55;
  --gray-7: #323239;
  --gray-8: #25252b;
  --gray-9: #1c1c20;
  --gray-10: #1d1d22;
  --gray-11: #16161a;
  --gray-12: #0d0d11;

  --theme-blue: #6ab0f3;
  --theme-green: #92d192;
  --yellow: #ffd479;

  --color-primary: var(--theme-blue);
  --color-text-link: var(--color-primary);
  --color-text-link-hover: var(--color-primary);

  --font-family: "Outfit", -apple-system, BlinkMacSystemFont, Avenir, Helvetica, Arial, sans-serif;
  --font-family-heading: "Outfit", -apple-system, BlinkMacSystemFont, "DM Sans", Avenir, Helvetica, Arial, sans-serif;
  --font-family-monospace: Menlo, "Google Sans Code", monospace;

  --border-radius: 6px;
  --navbar-height: 60px;
  --sidebar-width: 220px;
  --content-width: 760px;

  --color-background: var(--gray-9);
  --color-background-alternate: var(--gray-11);
  --color-background-navbar: var(--gray-9);
  --color-background-sidebar: var(--gray-9);
  --color-background-card: var(--gray-8);
  --color-background-input: var(--gray-11);
  --color-background-navbar-link-hover: var(--gray-8);
  --color-background-navbar-link-active: var(--gray-7);
  --color-background-button: var(--gray-8);
  --color-background-button-hover: hsla(0,0%,100%,.05);
  --color-background-button-secondary: var(--gray-8);
  --color-background-button-secondary-hover: hsla(0,0%,100%,.05);

  --color-text: var(--gray-3);
  --color-text-emphasized: var(--gray-0);
  --color-text-muted: var(--gray-5);
  --color-text-heading-muted: var(--gray-3);
  --color-text-navbar-link: var(--gray-1);
  --color-text-navbar-link-hover: var(--gray-0);
  --color-text-button: var(--gray-0);
  --color-text-button-hover: var(--color-primary);
  --color-text-button-secondary: var(--gray-0);
  --color-text-button-secondary-hover: var(--color-primary);

  --color-border: var(--gray-7);
  --color-border-hover: var(--gray-5);
  --color-border-card: var(--gray-7);
  --color-border-button: var(--gray-7);
  --color-border-button-hover: var(--color-primary);
  --color-border-button-secondary: var(--gray-7);
  --color-border-button-secondary-hover: var(--color-primary);

  --box-shadow: 0px 4px 7px rgba(0,1,2,.3), 0px 2px 2px rgba(0,1,2,.3), 0px 1px 1px rgba(0,1,2,.3);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

a { color: var(--color-text-link); font-weight: 500; text-decoration: none; }
a:hover { color: var(--color-text-link-hover); text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Buttons ── */
.button, a.button {
  align-items: center;
  background: var(--color-background-button);
  border: 2px solid var(--color-border-button);
  border-radius: var(--border-radius);
  color: var(--color-text-button);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-family: var(--font-family);
  font-weight: 600;
  gap: .35rem;
  line-height: 1;
  padding: 10px 16px;
  text-decoration: none !important;
  transition: background .1s ease, border-color .1s ease, color .1s ease;
  white-space: nowrap;
}
a.button:hover {
  background: var(--color-background-button-hover);
  border-color: var(--color-border-button-hover);
  color: var(--color-text-button-hover);
  text-decoration: none !important;
}
a.button:active { transform: scale(.95); }
a.button.secondary {
  background: var(--color-background-button-secondary);
  border-color: var(--color-border-button-secondary);
  color: var(--color-text-button-secondary);
}
a.button.secondary:hover {
  background: var(--color-background-button-secondary-hover);
  border-color: var(--color-border-button-secondary-hover);
  color: var(--color-text-button-secondary-hover);
}
a.button.small { font-size: 13px; padding: 5px 10px; font-weight: 600; }

/* ── Navbar (mobile/tablet only) ── */
.navbar {
  background: var(--color-background-navbar);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  height: var(--navbar-height);
  gap: 1rem;
  justify-content: space-between;
  left: 0;
  padding: 0 .75rem 0 1.25rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
}
@media screen and (min-width: 1020px) { .navbar { display: none; } }

.navbar-title { display: flex; align-items: center; }

a.navbar-title-link {
  align-items: center;
  background: hsla(0,0%,6%,.5);
  border-radius: var(--border-radius);
  color: var(--color-text-navbar-link);
  display: flex;
  font-weight: 600;
  gap: .65rem;
  padding: .3rem .65rem;
  text-decoration: none;
  white-space: nowrap;
}
a.navbar-title-link:hover { background: rgba(0,0,0,.55); color: var(--gray-0); text-decoration: none; }

.navbar-logo {
  border-radius: 50%;
  height: 28px;
  min-height: 28px;
  min-width: 28px;
  object-fit: cover;
  width: 28px;
}

.site-name {
  font-family: var(--font-family-heading);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.navbar-icons { display: flex; gap: 2px; align-items: center; }

.mobile-menu-btn {
  align-items: center;
  background: none;
  border: none;
  border-radius: var(--border-radius);
  color: var(--gray-4);
  cursor: pointer;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.mobile-menu-btn:hover { background: var(--color-background-navbar-link-hover); color: var(--gray-0); }

.mobile-nav {
  background: var(--color-background-navbar);
  border-bottom: 1px solid var(--color-border);
  display: none;
  left: 0;
  padding: .5rem 1rem .75rem;
  position: fixed;
  top: var(--navbar-height);
  width: 100%;
  z-index: 9;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  border-radius: var(--border-radius);
  color: var(--color-text);
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  gap: .5rem;
  padding: 7px .4rem;
  text-decoration: none;
}
.mobile-nav a:hover { background: var(--color-background-navbar-link-hover); color: var(--color-text-emphasized); }

@media screen and (min-width: 1020px) {
  .mobile-menu-btn { display: none; }
  .mobile-nav { display: none !important; }
}

a.navbar-icon {
  align-items: center;
  border-radius: var(--border-radius);
  color: var(--gray-4);
  display: flex;
  height: 38px;
  justify-content: center;
  text-decoration: none;
  width: 38px;
}
a.navbar-icon:hover { background: var(--color-background-navbar-link-hover); color: var(--gray-0); text-decoration: none; }

/* ── Layout ── */
.layout { padding-top: var(--navbar-height); }
@media screen and (min-width: 1020px) {
  .layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    margin: 0 auto;
    max-width: calc(var(--content-width) + var(--sidebar-width) + 4rem);
    padding-top: 0;
  }
}

/* ── Sidebar ── */
.sidebar {
  background: var(--color-background-sidebar);
  border-right: 1px solid var(--color-border);
  display: none;
  height: 100vh;
  min-width: var(--sidebar-width);
  overflow-y: auto;
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
}
@media screen and (min-width: 1020px) { .sidebar { display: block; } }

.sidebar-top {
  align-items: center;
  display: flex;
  gap: .65rem;
  padding: 1.25rem 1.25rem .75rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}
.sidebar-top:hover { text-decoration: none; }
.sidebar-top:hover .site-name { text-decoration: underline; }

.sidebar-avatar {
  border-radius: var(--border-radius);
  height: 42px;
  object-fit: cover;
  width: 42px;
  flex-shrink: 0;
}

.sidebar-name {
  color: var(--color-text-emphasized);
  font-family: var(--font-family-heading);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-about {
  padding: 1rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-about p {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.sidebar-about p a { color: var(--color-text-link); }

.sidebar-nav {
  padding: .75rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-links a {
  align-items: center;
  border-radius: var(--border-radius);
  color: var(--color-text);
  display: flex;
  font-size: 15px;
  font-weight: 500;
  gap: .5rem;
  margin-left: -.4rem;
  padding: 5px .4rem;
  text-decoration: none;
}
.sidebar-nav-links a:hover,
.sidebar-nav-links a.active {
  background: var(--color-background-navbar-link-hover);
  color: var(--color-text-emphasized);
  text-decoration: none;
}
.sidebar-nav-links a img { display: inline-block; flex-shrink: 0; height: 18px; max-width: none; width: 18px; }

.sidebar-connected { padding: .75rem 1.25rem 1.5rem; }
.sidebar-connected-heading {
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  margin-bottom: .6rem;
  text-transform: uppercase;
}
.sidebar-connected-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-connected-links a {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  padding: 1px 0;
}
.sidebar-connected-links a:hover { color: var(--gray-0); text-decoration: none; }

/* ── Main content ── */
.main-wrapper { min-height: 100vh; }
.main-content {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--content-width);
  padding: 2rem 1.5rem 4rem;
}
@media screen and (min-width: 800px) {
  .main-content { padding: 2.5rem 2rem 5rem; }
}

/* ── Hero ── */
.hero { margin-bottom: 3rem; }
@media screen and (min-width: 800px) { .hero { margin-bottom: 4rem; margin-top: 1rem; } }

.hero-wrapper {
  align-items: flex-start;
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
}
@media screen and (min-width: 800px) {
  .hero-wrapper { flex-direction: row; align-items: center; gap: 2.5rem; }
}

.hero-text { flex: 1; }

.hero h1 {
  font-family: var(--font-family-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-text-emphasized);
  line-height: 1.15;
  margin: 0 0 1rem;
}
@media screen and (min-width: 800px) { .hero h1 { font-size: 3rem; } }

.hero-description {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 560px;
}
@media screen and (min-width: 800px) { .hero-description { font-size: 1.1rem; } }
.hero-description a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-image-wrap { flex-shrink: 0; }
.hero-image {
  height: 100px;
  image-rendering: pixelated;
  object-fit: contain;
  width: 100px;
}
@media screen and (min-width: 800px) { .hero-image { height: 190px; width: 190px; } }

/* ── Section headings ── */
.section { margin-bottom: 3rem; }

.section-heading {
  align-items: center;
  display: flex;
  gap: .65rem;
  margin-bottom: .4rem;
}
.section-heading h2 {
  color: var(--color-text-emphasized);
  font-family: var(--font-family-heading);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
@media screen and (min-width: 800px) { .section-heading h2 { font-size: 1.9rem; } }

.section-heading img {
  height: 28px;
  image-rendering: pixelated;
  width: 28px;
}

.section-desc {
  color: var(--color-text-muted);
  font-size: .9rem;
  margin: 0 0 .9rem;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

/* ── Post rows ── */
a.post-row {
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-link);
  display: flex;
  flex-direction: column;
  padding: 7px 0;
  text-decoration: none;
}
a.post-row:last-child { border-bottom: none; }
a.post-row .post-row-inner {
  align-items: center;
  display: flex;
  font-weight: 600;
  gap: .5rem;
  margin: 0;
}
a.post-row time {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}
@media screen and (min-width: 900px) {
  a.post-row { flex-direction: row; align-items: center; font-size: 1.05rem; padding: 5px 0; }
  a.post-row time { font-size: .88rem; min-width: 135px; width: 135px; }
  a.post-row:hover { background: var(--color-background-navbar-link-hover); }
  a.post-row:hover time { color: var(--color-text-emphasized); }
}

.chip {
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text-muted);
  display: inline-flex;
  font-size: .75rem;
  font-weight: 500;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Card grid ── */
.cards {
  display: grid;
  gap: .6rem;
  grid-template-columns: 1fr;
}
@media screen and (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); gap: .75rem; } }
@media screen and (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--color-background-card);
  border: 2px solid var(--color-border-card);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: .9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.card:hover { border-color: var(--gray-6); }

.card-icon-row {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin-bottom: .15rem;
}
.card-emoji { font-size: 1.3rem; line-height: 1; }

.card-title {
  color: var(--color-text-emphasized);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-desc {
  color: var(--color-text-muted);
  font-size: .8rem;
  line-height: 1.5;
  flex: 1;
}

/* ── Project cards ── */
.project-cards {
  display: grid;
  gap: .6rem;
  grid-template-columns: 1fr;
}
@media screen and (min-width: 700px) { .project-cards { grid-template-columns: repeat(2, 1fr); gap: .75rem; } }

.project-card {
  background: var(--color-background-card);
  border: 2px solid var(--color-border-card);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .9rem 1rem 1rem;
  position: relative;
}
.project-card:hover { border-color: var(--gray-6); }

.project-card-year {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
}

.project-card-title {
  color: var(--color-text-emphasized);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: .1rem 0;
}

.project-card-desc {
  color: var(--color-text);
  font-size: .85rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: .5rem;
}

.project-card-stack {
  color: var(--color-text-muted);
  font-size: .78rem;
  margin-bottom: .5rem;
}

.project-card-links { display: flex; gap: .4rem; flex-wrap: wrap; }

.tag-btn {
  align-items: center;
  background: var(--color-background-button-secondary);
  border: 2px solid var(--color-border-button-secondary);
  border-radius: var(--border-radius);
  color: var(--color-text-button-secondary);
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  text-decoration: none;
  transition: border-color .1s, color .1s;
}
.tag-btn:hover { border-color: var(--color-border-button-secondary-hover); color: var(--color-text-button-secondary-hover); text-decoration: none; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  padding: 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
  max-width: var(--content-width);
  padding: 1.5rem 1.5rem;
}
@media screen and (min-width: 800px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.5rem 2rem; }
}
.footer-links { display: flex; gap: .75rem; flex-wrap: wrap; }
a.footer-link { color: var(--color-text-muted); white-space: nowrap; }
a.footer-link:hover { color: var(--color-text-link-hover); text-decoration: underline; }
.footer-made { color: var(--color-text-muted); }

/* ── About / article pages ── */
.page-article h2 {
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-emphasized);
  font-family: var(--font-family-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 .75rem;
  padding-bottom: .5rem;
}
.page-article h3 {
  color: var(--color-text-heading-muted);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 .5rem;
}
.page-article p {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.75;
  margin: .75rem 0;
}
.page-article p:first-of-type { margin-top: 0; }
.page-article a {
  color: var(--color-text-link);
  font-weight: 600;
  text-decoration: underline;
}
.page-article a:hover { color: var(--color-text-link-hover); }
.page-article ul {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.7;
  margin: .5rem 0;
  padding-left: 1.25rem;
}
.page-article li { padding-bottom: .15rem; }
.page-article li::marker { color: var(--gray-6); }
.about-contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: .5rem;
}
.about-contact-links a {
  color: var(--color-text-link);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.about-contact-links a:hover { text-decoration: underline; }

/* ── Songs / Spotify embeds ── */
.song-list { display: flex; flex-direction: column; margin-top: .25rem; }
.song-item { border-bottom: 1px solid var(--color-border); }
.song-item:last-child { border-bottom: none; }
.song-row {
  align-items: baseline;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  font-family: var(--font-family);
  gap: .75rem;
  justify-content: space-between;
  padding: 7px 0;
  text-align: left;
  width: 100%;
}
.song-row:hover .song-title, .song-row.playing .song-title { color: var(--color-primary); }
.song-embed { display: none; padding-bottom: .5rem; }
.song-embed iframe { border-radius: var(--border-radius); display: block; width: 100%; }
.song-title { color: var(--color-text-emphasized); font-weight: 600; font-size: .95rem; transition: color .1s; }
.song-artist { color: var(--color-text-muted); font-size: .85rem; white-space: nowrap; }

/* ── Frog easter egg ── */
.frog-corner { bottom: 0; left: 0; height: 80px; image-rendering: auto; pointer-events: none; position: fixed; width: auto; z-index: 5; }
.frog-corner-mobile { display: none; }
@media screen and (max-width: 1019px) {
  .frog-corner { display: none; }
  .frog-corner-mobile { display: block; position: relative; text-align: left; padding: 1rem 1.5rem 1.5rem; min-height: 80px; }
  .frog-corner-mobile img { height: 80px; width: auto; image-rendering: auto; -webkit-tap-highlight-color: transparent; cursor: pointer; }
}

.frog-bubble {
  animation: frogPop .25s cubic-bezier(.34,1.56,.64,1) forwards;
  background: var(--gray-8);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  bottom: 90px;
  color: var(--color-primary);
  display: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  left: 8px;
  line-height: 1.6;
  padding: 7px 10px;
  pointer-events: none;
  position: fixed;
  white-space: nowrap;
  z-index: 20;
}

.frog-bubble::after { border: 6px solid transparent; border-top-color: var(--color-primary); bottom: -14px; content: ''; left: 18px; position: absolute; }
.frog-bubble::before { border: 6px solid transparent; border-top-color: var(--gray-8); bottom: -11px; content: ''; left: 18px; position: absolute; z-index: 1; }
.frog-bubble.visible { display: block; }

/* Mobile bubble floats above the frog without affecting layout */
.frog-corner-mobile .frog-bubble {
  position: absolute;
  bottom: 90px;
  left: 1.5rem;
  margin-bottom: 0;
  display: none;
}
.frog-corner-mobile .frog-bubble.visible {
  display: inline-block;
}
.frog-bubble.hide { animation: frogFade .3s ease forwards; }
@keyframes frogPop { from { opacity: 0; transform: scale(.6) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes frogFade { from { opacity: 1; } to { opacity: 0; } }
