.top-nav .logo,
.top-nav a,
.top-nav button {
  text-decoration: none;
  font-family: var(--font-mono);
}
#theme-toggle img,
footer .social-icons img {
  width: 1.4rem;
  height: 1.4rem;
}
#theme-toggle:hover img,
.mobile-menu-toggle:hover img,
footer .social-icons a:hover img {
  transform: scale(1.1);
  opacity: 0.75;
}
.hero,
footer,
main.not-found {
  text-align: center;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-v19-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-v19-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/roboto-mono-v30-latin-regular.woff2") format("woff2");
}
:root {
  --bg: #0f0f0f;
  --text: #eaeaea;
  --bg-secondary: #1a1a1a;
  --muted: #888;
  --border: #2c2c2c;
  --radius: 6px;
  --font-mono: "Roboto Mono", monospace;
  --font-sans: "Inter", sans-serif;
  --hover-bg: #181818;
}
.light {
  --bg: #ffffff;
  --text: #1a1a1a;
  --bg-secondary: #f7f7f7;
  --muted: #666;
  --border: #dddddd;
  --hover-bg: #efefef;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}
a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font-mono);
  transition: background 0.2s, color 0.2s;
}
a:focus,
button:focus {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
p {
  font-family: var(--font-sans);
  margin-bottom: 1rem;
}
.tagline,
h1,
h2,
h3 {
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
h1 {
  font-size: 2.2rem;
}
h2 {
  font-size: 1.7rem;
}
h3 {
  font-size: 1.25rem;
}
.tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}
.hero {
  padding: 2.5rem 1rem 2rem;
}
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
section {
  margin-bottom: 3.5rem;
}
.top-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.top-nav .logo {
  font-weight: 700;
  font-size: 1rem;
}
.top-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}
.top-nav a,
.top-nav button {
  font-size: 0.95rem;
  color: var(--text);
  background: 0 0;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s;
}
.mobile-menu-toggle img,
footer .social-icons img {
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
  filter: invert(1) brightness(1.2);
}
.card:hover,
.top-nav a:hover,
.top-nav button:hover {
  background: var(--hover-bg);
}
.top-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mobile-menu-toggle {
  display: none;
  background: 0 0;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
}
.card,
.terminal {
  background: var(--bg-secondary);
}
.mobile-menu-toggle img {
  width: 1.6rem;
  height: 1.6rem;
}
.light .mobile-menu-toggle img {
  filter: none;
}
@media (max-width: 768px) {
  .top-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    animation: 0.2s ease-in-out fadeIn;
    z-index: 10;
  }
  .top-nav ul.open {
    display: flex;
  }
  .top-nav ul li {
    text-align: right;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
.button.secondary,
.card a.button {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.button.secondary:hover {
  background: var(--hover-bg);
}
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card-content,
.terminal {
  padding: 1rem 1.2rem;
}
.card-content p:last-child {
  margin-bottom: 0;
}
.hero.compact {
  padding: 2rem 1rem;
}
.card-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .card-group {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
}
@media (max-width: 400px) {
  .card-group {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card {
    flex-direction: column;
  }
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}
.button.secondary,
.card a.button,
.terminal,
footer,
footer a,
footer p {
  font-family: var(--font-mono);
}
.card a.button {
  margin-top: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--text);
  border-radius: var(--radius);
}
.button.secondary:hover,
.card a.button:hover {
  background: var(--text);
  color: var(--bg);
}
.terminal {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  margin: 1.5rem auto;
  max-width: 600px;
  white-space: pre-line;
  font-size: 0.95rem;
}
#theme-toggle img {
  transition: opacity 0.2s, transform 0.2s;
}
#theme-toggle .moon-icon,
#theme-toggle .sun-icon {
  display: none !important;
}
.light #theme-toggle .moon-icon {
  display: inline !important;
  filter: none;
}
html:not(.light) #theme-toggle .sun-icon {
  display: inline !important;
  filter: invert(1) brightness(1.2);
}
footer {
  padding: 2rem 1rem 3rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}
footer a,
footer p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: inherit;
}
footer .social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}
.card img,
.project-img {
  height: auto;
  display: block;
}
footer .social-icons a:hover img {
  filter: invert(1) brightness(1.1);
}
.light footer .social-icons a:hover img,
.light footer .social-icons img {
  filter: none;
  opacity: 0.75;
}
.button.secondary {
  margin-top: 2rem;
  border: 1px solid var(--text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}
main.not-found {
  padding: 4rem 1.5rem;
}
.project-img {
  width: 100%;
  object-fit: cover;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card img {
  max-width: 100%;
}
.post-card + .post-card {
  margin-top: 2rem;
}
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 3rem;
  max-width: 600px;
  font-family: var(--font-mono);
}
.blog-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.blog-list li:last-child {
  border-bottom: none;
}
.blog-list a {
  color: var(--text);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}
.blog-list a:hover,
.blog-list a:focus {
  color: var(--text);
  outline: none;
  color: var(--primary, #0af);
}
.blog-list small {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
}
