/* =========================
   ROOT VARIABLES
   ========================= */

:root {
  --bg: #0c0c0c;
  --text: #d6eaff;

  --black: #000000;
  --white: #ffffff;
  --blue: #4da3ff;
  --yellow: #ffd84d;
  --green: #6dff57;
  --pink: #ff4da6;

  --cyan: #66f5f1;

  --muted: #aaaaaa;
  --news: #ccd8e8;
  --hr: #d6eaff;

  --max-width: 70ch;
  --spacing: 1rem;
}


/* =========================
   RESET / BASE
   ========================= */

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

body {
  margin: 0;
  padding: 0;

  font-family: "Lucida Console", Monaco, monospace;
  font-size: 14px;
  line-height: 1.6;

  background: var(--bg);
  color: var(--text);
}

main {
  max-width: 70ch;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
}

h1,
h2 {
  font-weight: normal;
  line-height: 1.6;
}

pre {
  font-family: monospace;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: auto;
}

hr {
  border: none;
  border-top: 1px solid var(--hr);
  margin: 2rem 0;
}


/* =========================
   LAYOUT
   ========================= */

header,
footer {
  text-align: center;
  margin-bottom: 1.5rem;
}

nav {
  text-align: center;
  margin: 1rem auto;
  line-height: 2;
}


/* =========================
   NAVIGATION
   ========================= */

nav a {
  text-decoration: none;
  padding: 2px 4px;
  margin: 0 0.3rem;
}

/* Home */

nav a.home {
  color: var(--blue);
}

nav a.home:hover,
body.home nav a[href="/"] {
  background: var(--blue);
  color: var(--black);
}

/* Projects */

nav a.projects {
  color: var(--yellow);
}

nav a.projects:hover,
body.projects nav a[href="projects.html"] {
  background: var(--yellow);
  color: var(--black);
}

/* Server */

nav a.server {
  color: var(--green);
}

nav a.server:hover,
body.server nav a[href="server.html"] {
  background: var(--green);
  color: var(--black);
}

/* Music */

nav a.music {
  color: var(--pink);
}

nav a.music:hover,
body.music nav a[href="music.html"] {
  background: var(--pink);
  color: var(--black);
}


/* =========================
   LINKS
   ========================= */

main a {
  color: var(--white);
  padding: 2px 4px;
}

main a:hover {
  color: var(--black);
  background: var(--white);
}

main a.projects {
  color: var(--yellow);
}

main a.projects:hover {
  background: var(--yellow);
  color: var(--black);
}


/* =========================
   TYPOGRAPHY
   ========================= */

header {
  text-align: center;
  margin-top: clamp(2rem, 8vh, 5rem);
  margin-bottom: 1.5rem;
}

header strong {
  font-size: 1.8rem;
  font-weight: normal;
}

header img {
  margin-bottom: 1rem;
}

#paragraph {
  text-align: justify;
}

#sub-headline {
  color: var(--muted);
  font-style: italic;
  text-align: justify;
}

#span-text {
  font-size: 0.75rem;
}


/* =========================
   COMPONENTS
   ========================= */

.news {
  color: var(--news);
  line-height: 1.6;
  max-height: 50rem;
  overflow-y: auto;
}

.logo {
  max-width: 100%;
  height: auto;
  transition: transform 0.25s ease;

  filter: brightness(0)
          saturate(100%)
          invert(89%)
          sepia(18%)
          saturate(640%)
          hue-rotate(174deg)
          brightness(103%)
          contrast(101%);
}

img {
  animation: imgZoom 0.6s ease-out;
}

img:hover {
  transform: scale(1.1);
}

@keyframes imgZoom {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1);
  }
}


/* =========================
   DESKTOP BREAKPOINT
   ========================= */

@media (min-width: 768px) {

  body {
    font-size: 17px;
  }

  header strong {
    font-size: 2rem;
  }

  nav {
    margin: 2rem 0;
  }

}

.scramble {
  font-family: "JetBrainsMono Nerd Font Mono", "Noto Sans JP", monospace;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.scramble:hover {
  color: #7aa2f7; /* Tokyo Night blue */
  animation: glitch 0.15s linear;
}

@keyframes glitch {
  0% { opacity: 1; }
  50% { opacity: 0.85; }
  100% { opacity: 1; }
}

