.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-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2");
}
:root {
  --bg: #0a0a0a;
  --text: #f5f5f5;
  --bg-secondary: #141414;
  --muted: #888888;
  --border: #2a2a2a;
  --radius: 8px;
  --font-mono: "JetBrains Mono", monospace;
  --font-sans: "Inter", sans-serif;
  --hover-bg: #1a1a1a;
  --accent: #4a9eff;
  --accent-hover: #3b82f6;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.light {
  --bg: #ffffff;
  --text: #1a1a1a;
  --bg-secondary: #f8f9fa;
  --muted: #6b7280;
  --border: #e5e7eb;
  --hover-bg: #f3f4f6;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: -0.01em;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--font-mono);
  transition: background 0.2s, color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}
a:focus,
button:focus {
  outline: 2px solid var(--accent);
  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: 1rem;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
}
h2 {
  font-size: 1.75rem;
  font-weight: 600;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 0.75rem;
  font-weight: 400;
}
.hero {
  padding: 3rem 1rem 2.5rem;
  background: var(--bg);
}
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: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.top-nav .logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}
.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.4rem 0.6rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu-toggle img,
footer .social-icons img {
  transition: opacity 0.2s, transform 0.2s;
}
.mobile-menu-toggle .dark-icon,
footer .social-icons .dark-icon {
  display: inline;
}
.mobile-menu-toggle .light-icon,
footer .social-icons .light-icon {
  display: none;
}
.light .mobile-menu-toggle .dark-icon,
.light footer .social-icons .dark-icon {
  display: none;
}
.light .mobile-menu-toggle .light-icon,
.light footer .social-icons .light-icon {
  display: inline;
}
#theme-toggle .dark-icon {
  display: inline;
}
#theme-toggle .light-icon {
  display: none;
}
.light #theme-toggle .dark-icon {
  display: none;
}
.light #theme-toggle .light-icon {
  display: inline;
}
.card:hover,
.top-nav a:hover,
.top-nav button:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
}
.top-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  background: transparent;
}
.top-nav a[aria-current="page"]:hover {
  color: var(--accent-hover);
  background: var(--hover-bg);
}
.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;
}
.button.secondary,
.card a.button {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.button.secondary:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.6s ease-out;
}
.card-content,
.terminal {
  padding: 1.25rem 1.5rem;
}
.card-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.button.secondary,
.card a.button,
.terminal,
footer,
footer a,
footer p {
  font-family: var(--font-mono);
}
.card a.button {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent);
  font-weight: 500;
  transition: all 0.2s ease;
}
.card a.button:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}
.project-meta,
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tech-tag {
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: calc(var(--radius) / 2);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.2s ease;
}
.tech-tag:hover {
  color: var(--text);
  border-color: var(--text);
  transform: translateY(-1px);
}
.terminal {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  margin: 1rem auto;
  max-width: 600px;
  white-space: pre-line;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
footer {
  padding: 2rem 1rem 2.5rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.card img,
.project-img {
  height: auto;
  display: block;
}
footer .social-icons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
footer .social-icons li {
  display: flex;
}
footer .social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
footer .social-icons a:hover {
  background: var(--hover-bg);
  border-color: var(--border);
  transform: translateY(-2px);
  color: var(--text);
}
footer .social-icons img {
  width: 1.5rem;
  height: 1.5rem;
  transition: all 0.3s ease;
}
footer .social-icons a:hover img {
  opacity: 1;
  transform: scale(1.1);
}
.button.secondary {
  margin-top: 2rem;
  border: 1px solid var(--accent);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent);
  font-weight: 500;
  transition: all 0.2s ease;
}
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);
  transition: transform 0.2s ease;
}
.card:hover .project-img {
  transform: scale(1.02);
}
.card img {
  max-width: 100%;
}
.post-card + .post-card {
  margin-top: 2rem;
}
.post-content {
  max-width: 700px;
  margin: 0 auto;
  font-family: var(--font-sans);
  line-height: 1.8;
}
.post-content h2,
.post-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.post-content ul,
.post-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 3rem;
  max-width: 600px;
  font-family: var(--font-mono);
}
.blog-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}
.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(--accent);
  outline: none;
}
.blog-list small {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
}

@media (min-width: 600px) {
  .card-group {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.125rem;
  }
  .hero {
    padding: 2rem 1rem 1.5rem;
  }
  main {
    padding: 1.5rem 1rem;
  }
  section {
    margin-bottom: 2.5rem;
  }
  .top-nav {
    padding: 0.75rem 1rem;
  }
  .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;
    min-width: 120px;
    box-shadow: var(--shadow-lg);
  }
  .top-nav ul.open {
    display: flex;
  }
  .top-nav ul li {
    text-align: right;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .card-content,
  .terminal {
    padding: 1rem 1.25rem;
  }
  .terminal {
    margin: 0.75rem auto;
    font-size: 0.9rem;
  }
  footer {
    padding: 1.5rem 1rem 2rem;
    font-size: 0.85rem;
    gap: 0.6rem;
  }
  .blog-list {
    margin: 0 auto 2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  h3 {
    font-size: 1rem;
  }
  .hero {
    padding: 1.5rem 0.75rem 1rem;
  }
  main {
    padding: 1rem 0.75rem;
  }
  section {
    margin-bottom: 2rem;
  }
  .top-nav {
    padding: 0.75rem 0.75rem;
  }
  .top-nav ul {
    left: 0.75rem;
    right: 0.75rem;
  }
  .card-content,
  .terminal {
    padding: 0.875rem 1rem;
  }
  .card-group {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card {
    flex-direction: column;
  }
  .card a.button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  .terminal {
    margin: 0.5rem auto;
    font-size: 0.85rem;
    max-width: 100%;
  }
  footer {
    padding: 1.25rem 0.75rem 1.75rem;
    font-size: 0.8rem;
    gap: 0.5rem;
  }
  footer .social-icons {
    gap: 1rem;
  }
  footer .social-icons a {
    padding: 0.3rem;
  }
  footer .social-icons img {
    width: 1.25rem;
    height: 1.25rem;
  }
  .button.secondary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-top: 1.5rem;
  }
  .blog-list {
    margin: 0 auto 1.5rem;
  }
  .blog-list li {
    padding: 0.6rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
