@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;700&display=swap");

* {
  font-family: inherit;
  text-decoration: none;
  margin: 0;
  padding: 0;
  -webkit-user-drag: none;
  -moz-window-dragging: none;
  -webkit-tap-highlight-color: transparent;
}
* img {
  max-width: 100%;
}
a {
  color: inherit;
}

html,
body {
  color: var(--white-2);
  background-color: var(--gray-5);
  font-family: "IBM Plex Mono", "JetBrains Mono", monospace;
  line-height: 1.9rem;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

body {
  padding: 2.5rem;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(59, 247, 166, 0.1),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 12%,
      rgba(88, 196, 255, 0.12),
      transparent 26%
    ),
    radial-gradient(
      circle at 20% 82%,
      rgba(43, 241, 211, 0.08),
      transparent 28%
    ),
    linear-gradient(180deg, #050b12, #040a10 45%, #050b12 100%);
  position: relative;
  overflow-x: hidden;
}

@media (prefers-color-scheme: light) {
  body {
    background: radial-gradient(
        circle at 12% 18%,
        rgba(11, 191, 146, 0.18),
        transparent 32%
      ),
      radial-gradient(
        circle at 78% 10%,
        rgba(31, 160, 242, 0.2),
        transparent 30%
      ),
      radial-gradient(
        circle at 20% 82%,
        rgba(11, 191, 146, 0.14),
        transparent 28%
      ),
      linear-gradient(180deg, #f2f9ff, #e6f3fb 55%, #f8fcff);
  }
}

html[data-theme="light"] body {
  background: radial-gradient(
      circle at 12% 18%,
      rgba(11, 191, 146, 0.18),
      transparent 32%
    ),
    radial-gradient(
      circle at 78% 10%,
      rgba(31, 160, 242, 0.2),
      transparent 30%
    ),
    radial-gradient(
      circle at 20% 82%,
      rgba(11, 191, 146, 0.14),
      transparent 28%
    ),
    linear-gradient(180deg, #f2f9ff, #e6f3fb 55%, #f8fcff);
}

html[data-theme="dark"] body {
  background: radial-gradient(
      circle at 10% 20%,
      rgba(59, 247, 166, 0.1),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 12%,
      rgba(88, 196, 255, 0.12),
      transparent 26%
    ),
    radial-gradient(
      circle at 20% 82%,
      rgba(43, 241, 211, 0.08),
      transparent 28%
    ),
    linear-gradient(180deg, #050b12, #040a10 45%, #050b12 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 110px 110px;
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 0;
}

@media (prefers-color-scheme: light) {
  body::before {
    opacity: 0.15;
  }
}

html[data-theme="light"] body::before {
  opacity: 0.15;
}

html[data-theme="dark"] body::before {
  opacity: 0.25;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 50% 0,
      rgba(88, 196, 255, 0.12),
      transparent 35%
    ),
    radial-gradient(
      circle at 12% 75%,
      rgba(59, 247, 166, 0.09),
      transparent 35%
    );
  pointer-events: none;
  z-index: 1;
}

main {
  margin: 0 auto;
  max-width: 960px;
  padding: 3rem 1.5rem 4rem 1.5rem;
  position: relative;
  z-index: 2;
}

/* header */

header {
  padding: 2.25rem 0 3rem 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
header .brand {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
header .site-title {
  font-size: clamp(2.4rem, 3.5vw, 3.6rem);
  font-weight: 700;
  line-height: 110%;
  color: var(--white-1);
  letter-spacing: 0.06em;
  font-family: "Space Grotesk", "IBM Plex Mono", monospace;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(58, 247, 166, 0.15),
    0 0 8px rgba(72, 168, 255, 0.25);
}
header .site-title::before {
  content: "▸";
  color: var(--accent-green);
  font-size: 1.6rem;
}
header .site-title:hover {
  color: var(--accent-green);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.nav-links a {
  color: var(--white-2);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease-in-out;
}
.nav-links a:hover {
  color: var(--accent-green);
  border-color: var(--border-strong);
  box-shadow: var(--glow-strong);
}

#dark-mode-toggle {
  border: 1px solid var(--border-strong);
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-blue);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease-in-out;
}
#dark-mode-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--accent-blue), var(--glow-strong);
}

#bio {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.4rem;
  padding: 1.35rem;
  background: linear-gradient(
      135deg,
      rgba(65, 255, 199, 0.08),
      rgba(73, 149, 255, 0.06)
    ),
    var(--panel-glass);
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--glow-strong);
}
#img-wrapper img {
  border-radius: 50%;
  max-width: 110px;
  border: 2px solid rgba(91, 214, 255, 0.35);
  box-shadow: 0 0 0 5px rgba(63, 247, 166, 0.08);
}
#bio-wrapper {
  margin-left: 0.2rem;
  flex: 1 1 0;
  min-width: 0;
}
#text-wrapper {
  line-height: 1.5rem;
  font-weight: 400;
  font-family: "Space Grotesk", "IBM Plex Mono", monospace;
}
#text-wrapper p:last-child {
  margin-bottom: 0;
}
#text-wrapper a {
  color: var(--accent-green);
  border-bottom: 1px solid rgba(59, 247, 166, 0.35);
}
#text-wrapper a:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}
#social-wrapper {
  margin-top: 1rem;
}
#social-wrapper img {
  filter: invert() brightness(1.2)
    drop-shadow(0 0 6px rgba(91, 214, 255, 0.35));
  width: 26px;
  height: 26px;
  margin: 0 0.4rem 0 0;
  transition: all 0.2s ease-in-out;
}
@media (prefers-color-scheme: light) {
  #social-wrapper img {
    filter: drop-shadow(0 0 6px rgba(31, 160, 242, 0.25));
  }
}
[data-theme="light"] {
  #social-wrapper img {
    filter: drop-shadow(0 0 6px rgba(31, 160, 242, 0.25));
  }
}
[data-theme="dark"] {
  #social-wrapper img {
    filter: invert() brightness(1.2)
      drop-shadow(0 0 6px rgba(91, 214, 255, 0.35));
  }
}
#social-wrapper img:hover {
  transform: translateY(-2px) scale(1.05);
}

.quote-box {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-blue);
  background: linear-gradient(
    120deg,
    rgba(59, 247, 166, 0.08),
    rgba(88, 196, 255, 0.08)
  );
  border-radius: 12px;
  color: var(--white-1);
  line-height: 1.6rem;
  position: relative;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}
.quote-mark {
  color: var(--accent-green);
  font-weight: 700;
  margin-right: 0.5rem;
  font-size: 1.3rem;
}
.quote-mark.end {
  margin-left: 0.25rem;
}
.quote-author {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white-2);
}

/* article section */

.articles {
  display: grid;
  row-gap: 1.7rem;
  margin: 3rem 0 3rem 0;
  position: relative;
  z-index: 2;
}
.articles .article {
  padding: 1.8rem;
  background: linear-gradient(145deg, var(--gray-3), var(--gray-2));
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  transition: all 0.25s ease-in-out;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.35), var(--glow-strong);
  backdrop-filter: blur(6px);
}
.articles .article::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
      circle at 15% 20%,
      rgba(59, 247, 166, 0.12),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 0%,
      rgba(91, 214, 255, 0.12),
      transparent 35%
    );
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}
.articles .article .article-title, 
.articles .article .article-title a {
  color: var(--white-1);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 130%;
  font-family: "Space Grotesk", "IBM Plex Mono", monospace;
}
.articles .article .article-title a:hover {
  color: var(--accent-green);
  text-shadow: var(--glow-strong);
}
.article-desc {
  margin-top: 0.6rem;
  color: var(--white-2);
  opacity: 0.85;
}
.articles .article:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 247, 166, 0.5);
}
.articles .article:hover::after {
  opacity: 1;
}
.articles .article .date {
  display: block;
  font-size: 0.85rem;
  color: var(--white-2);
  opacity: 0.85;
}
.articles .article .categories {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.articles .article .categories .category {
  margin: 0 0.5rem 0.4rem 0;
  display: block;
  color: var(--white-1);
  background: linear-gradient(
    120deg,
    rgba(59, 247, 166, 0.18),
    rgba(91, 214, 255, 0.2)
  );
  border-radius: 14px;
  font-size: 0.72rem;
  padding: 0 0.9rem;
  line-height: 1.5rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(91, 214, 255, 0.4);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: all 0.2s ease-in-out;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(91, 214, 255, 0.35);
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--white-2);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease-in-out;
}
.filter-chip.active {
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: var(--glow-strong);
}
.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.filter-controls select {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 20, 30, 0.9);
  color: var(--white-1);
  appearance: none;
}

.filter-controls select:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: var(--glow-strong);
}

[data-theme="light"] .filter-controls select {
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray-4);
  border-color: var(--gray-3);
}

[data-theme="light"] .filter-controls label {
  color: var(--gray-4);
}

@media (prefers-color-scheme: light) {
  .filter-controls select {
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-4);
    border-color: var(--gray-3);
  }
  
  .filter-controls label {
    color: var(--gray-4);
  }
}
.articles .article .categories .category:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(91, 214, 255, 0.3);
}

.page {
  margin: 2.5rem 0 3rem;
  background: linear-gradient(145deg, var(--gray-3), var(--gray-2));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 2rem 1.8rem;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.35), var(--glow-strong);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.page::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
      circle at 14% 16%,
      rgba(59, 247, 166, 0.12),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 0%,
      rgba(91, 214, 255, 0.12),
      transparent 35%
    );
  opacity: 0.35;
  pointer-events: none;
}
.page-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 1.2rem;
  line-height: 140%;
  font-family: "Space Grotesk", "IBM Plex Mono", monospace;
  color: var(--white-1);
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(58, 247, 166, 0.12);
}
.page .content * {
  line-height: 180%;
}
.page .content p {
  margin: 0 0 1.6rem 0;
  padding: 0;
}
.page .content h1,
.page .content h2,
.page .content h3,
.page .content h4,
.page .content h5,
.page .content h6 {
  margin: 1.6rem 0 1rem;
  color: var(--white-1);
  letter-spacing: 0.01em;
}
.page .content a {
  color: var(--accent-green);
  border-bottom: 1px solid rgba(59, 247, 166, 0.35);
}
.page .content a:hover {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}
.page .content ul {
  margin-left: 1rem;
  margin-bottom: 1.6rem;
}
.page .content ol {
  margin-left: 1.6rem;
  margin-bottom: 1.6rem;
}
.page .content ol * ol,
.page .content ul * ul {
  margin-left: 1rem;
  margin-bottom: 0;
}
.page .content code {
  padding: 3px 5px;
  color: var(--accent-blue);
  white-space: pre;
  background: rgba(91, 214, 255, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(91, 214, 255, 0.2);
}
.page .content pre {
  background: linear-gradient(145deg, #0d2030, #0b1624);
  padding: 1rem 1.5rem;
  margin-bottom: 1.6rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--glow-strong);
  overflow-x: auto;
}
.page .content blockquote {
  padding: 1rem 1.5rem;
  margin-bottom: 1.6rem;
  font-style: italic;
  border-left: 3px solid var(--accent-blue);
  background: linear-gradient(
    120deg,
    rgba(59, 247, 166, 0.08),
    rgba(88, 196, 255, 0.08)
  );
  border-radius: 10px;
}
.discord-presence {
  margin-top: 1rem;
  padding: 0.95rem 1.2rem;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: linear-gradient(
      140deg,
      rgba(59, 247, 166, 0.08),
      rgba(88, 196, 255, 0.08)
    ),
    rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25), var(--glow-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.2rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}
.discord-presence--compact {
  padding: 0.75rem 1rem;
  gap: 0.75rem 1rem;
}
#bio .discord-presence {
  margin-top: 0.85rem;
  width: 100%;
}
.discord-presence__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.discord-presence__indicator {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #7b8796;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(123, 135, 150, 0.4);
  flex-shrink: 0;
}
.discord-presence__label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--white-2);
  display: block;
}
.discord-presence__state {
  font-family: "Space Grotesk", "IBM Plex Mono", monospace;
  font-size: 1rem;
  color: var(--white-1);
  line-height: 1.4;
}
.discord-presence__message {
  margin: 0;
  flex: 1;
  color: var(--white-2);
  min-width: 160px;
}
.discord-presence[data-status="online"] .discord-presence__indicator {
  background: #3bf7a6;
  box-shadow: 0 0 10px rgba(59, 247, 166, 0.7);
}
.discord-presence[data-status="idle"] .discord-presence__indicator {
  background: #f6c04d;
  box-shadow: 0 0 10px rgba(246, 192, 77, 0.6);
}
.discord-presence[data-status="dnd"] .discord-presence__indicator {
  background: #ff6b7a;
  box-shadow: 0 0 10px rgba(255, 107, 122, 0.7);
}
.discord-presence[data-status="invisible"] .discord-presence__indicator,
.discord-presence[data-status="loading"] .discord-presence__indicator {
  background: #7b8796;
  box-shadow: 0 0 10px rgba(123, 135, 150, 0.4);
}
.discord-presence[data-status="error"] .discord-presence__indicator {
  background: #f08d49;
  box-shadow: 0 0 10px rgba(240, 141, 73, 0.65);
}
@media screen and (max-width: 600px) {
  .discord-presence {
    flex-direction: column;
    align-items: flex-start;
  }
}
.home-latest {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--gray-3), var(--gray-2));
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), var(--glow-strong);
}
.home-latest h2 {
  margin-bottom: 1rem;
  font-family: "Space Grotesk", "IBM Plex Mono", monospace;
  color: var(--white-1);
}
.latest-card {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(91, 214, 255, 0.25);
}
.latest-card h3 {
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
}
.latest-card h3 a {
  color: var(--white-1);
}
.latest-card h3 a:hover {
  color: var(--accent-green);
}
.latest-card .date {
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}
.latest-placeholder {
  opacity: 0.8;
}
.page .content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.01);
}
.page .content table th,
.page .content table td {
  border: 1px solid rgba(91, 214, 255, 0.25);
  padding: 0.75rem;
  text-align: left;
}
.page .content table th {
  background: rgba(91, 214, 255, 0.12);
  color: var(--white-1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ctf-table tbody tr:nth-child(every odd?) need not. add highlight.
.ctf-table tbody tr:nth-child(odd) { background: }

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--white-2);
  opacity: 0.9;
  letter-spacing: 0.04em;
}
footer p {
  font-size: 0.9rem;
}

footer #social-wrapper {
  margin-top: 0;
}

footer #social-wrapper img {
  width: 24px;
  height: 24px;
  margin: 0 0.3rem;
  filter: invert() brightness(1.2)
    drop-shadow(0 0 6px rgba(91, 214, 255, 0.35));
  transition: all 0.2s ease-in-out;
}

[data-theme="light"] footer #social-wrapper img {
  filter: drop-shadow(0 0 6px rgba(31, 160, 242, 0.25));
}

@media (prefers-color-scheme: light) {
  footer #social-wrapper img {
    filter: drop-shadow(0 0 6px rgba(31, 160, 242, 0.25));
  }
}

footer #social-wrapper img:hover {
  transform: translateY(-2px) scale(1.05);
}

/* media query */

@media screen and (max-width: 900px) {
  body {
    padding: 2rem;
  }
  main {
    padding: 2.5rem 1rem 3.5rem;
  }
}

@media screen and (max-width: 750px) {
  header {
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
  }
  header .brand {
    width: 100%;
  }
  .nav-links {
    gap: 0.5rem;
  }
  header #dark-mode-toggle {
    align-self: flex-end;
  }
  header .site-title {
    font-size: 3rem;
  }
  .articles {
    row-gap: 1.25rem;
  }
}

@media screen and (max-width: 550px) {
  body {
    padding: 1.5rem;
  }
  main {
    padding: 2rem 0.5rem 3rem;
  }
  #bio {
    flex-direction: column;
    align-items: flex-start;
  }
  #img-wrapper img {
    max-width: 85px;
  }
}

@media screen and (max-width: 350px) {
  main,
  .articles {
    padding: 0;
    margin: 0;
  }
  main {
    padding-bottom: 1rem;
  }
  .articles {
    margin: 2rem 0 3rem 0;
    row-gap: 1rem;
  }
  header .site-title {
    font-size: 2.4rem;
  }
  .article {
    padding: 1.3rem;
  }
  .articles .article .article-title,
  .articles .article .article-title a {
    font-size: 1.1rem;
  }
}
.ctf-table tbody tr:nth-child(odd) {
  background: rgba(91, 214, 255, 0.04);
}
.ctf-table tbody tr:hover {
  background: rgba(59, 247, 166, 0.08);
  transition: background 0.2s ease-in-out;
}
.page .content table th:nth-child(1) {
  width: 40%;
}
.page .content table th:nth-child(2) {
  width: 20%;
}
.page .content table th:nth-child(3) {
  width: 25%;
}
.page .content table td:nth-child(1) {
  width: 40%;
}
.page .content table td:nth-child(2) {
  width: 20%;
}
.page .content table td:nth-child(3) {
  width: 25%;
}
