:root {
  --lavender: #CBA0FF;
  --cyan: #7FDBFF;
  --pink: #FFABCA;
  --peach: #FFC9A3;
  --charcoal: #1B1B1F;
  --mint: #A8FFE2;
  --smokepurple: #2C243A;
  --yellow: #FFF68F;
  --base: var(--smokepurple);
  --text-primary: #E0E0E0;
  --accent-secondary: var(--cyan);
  --glow-color: var(--mint);
  --red: var(--pink);
  --teal: #315050;

}


body {
  background: linear-gradient(135deg,
      var(--smokepurple),
      #2E273B,
      /* slightly lighter smoky purple */
      #342C46,
      /* soft dusky purple */
      #3A3150,
      /* muted deep violet hint */
      #42385B
      /* subtle dark accent for depth */
    );
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  background-attachment: fixed;
  line-height: 1.7;
  min-height: 100vh;
  min-width: 98vw;
  transition: all 0.3 ease;
  /* padding-bottom: 80px; */
}

a,
i {
  color: var(--text-primary);
}


main section a {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 400;
  padding: 16px 20px;
  border-radius: 20px;
  overflow: visible;
  transition: color 0.3s ease, background 0.3s ease;
}

main section a:hover {
  animation: glitchEffect 0.3s;
  text-shadow: 0 0 8px currentColor;
}

@keyframes glitchEffect {

  0%,
  100% {
    text-shadow: 0 0 0 transparent;
  }

  20% {
    text-shadow: -2px -2px 0 var(--pink), 2px 2px 0 var(--cyan);
  }

  40% {
    text-shadow: 2px -2px 0 var(--red), -2px 2px 0 var(--cyan);
  }

  60% {
    text-shadow: -2px 2px 0 var(--red), 2px -2px 0 var(--cyan);
  }

  80% {
    text-shadow: 2px 2px 0 var(--red), -2px -2px 0 var(--cyan);
  }
}


section {
  background: rgba(44, 36, 58, 0.95);
  /* almost opaque */
  border: 1px solid var(--lavender);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(207, 160, 255, 0.15);
  box-sizing: border-box;
  margin: 2rem auto;
}


header {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  background: linear-gradient(135deg,
      var(--smokepurple),
      #2E273B);
  border-bottom: 1px solid var(--mint);
  box-shadow: 0 0 20px rgba(207, 160, 255, 0.15);
  position: relative;
  top: 0;
  /* z-index: 1000; */
  box-sizing: border-box;
  left: 0;
  right: 0;
  border-radius: 8px;
}

header h1 {
  margin: 0;
  padding: 5px 0;
  text-align: center;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

button a {
  /*  box-sizing: border-box; */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

button i {
  display: flex;
  align-items: center;
}


/* From Uiverse.io by namecho */
button,
button::after {
  padding: 16px 20px;
  font-size: 18px;
  background: linear-gradient(45deg, transparent 5%, var(--pink) 5%);
  border: 0;
  color: var(--text-primary);
  letter-spacing: 3px;
  line-height: 1;
  box-shadow: 6px 0px 0px var(--cyan);
  outline: transparent;
  position: relative;
}

button::after {
  --slice-0: inset(50% 50% 50% 50%);
  --slice-1: inset(80% -6px 0 0);
  --slice-2: inset(50% -6px 30% 0);
  --slice-3: inset(10% -6px 85% 0);
  --slice-4: inset(40% -6px 43% 0);
  --slice-5: inset(80% -6px 5% 0);
  content: "HOVER ME";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 3%, var(--cyan) 3%, var(--cyan) 5%, var(--pink) 5%);
  text-shadow: -3px -3px 0px var(--yellow), 3px 3px 0px var(--cyan);
  clip-path: var(--slice-0);
}

button:hover::after {
  animation: 1s glitch;
  animation-timing-function: steps(2, end);
}

@keyframes glitch {
  0% {
    clip-path: var(--slice-1);
    transform: translate(-20px, -10px);
  }

  10% {
    clip-path: var(--slice-3);
    transform: translate(10px, 10px);
  }

  20% {
    clip-path: var(--slice-1);
    transform: translate(-10px, 10px);
  }

  30% {
    clip-path: var(--slice-3);
    transform: translate(0px, 5px);
  }

  40% {
    clip-path: var(--slice-2);
    transform: translate(-5px, 0px);
  }

  50% {
    clip-path: var(--slice-3);
    transform: translate(5px, 0px);
  }

  60% {
    clip-path: var(--slice-4);
    transform: translate(5px, 10px);
  }

  70% {
    clip-path: var(--slice-2);
    transform: translate(-10px, 10px);
  }

  80% {
    clip-path: var(--slice-5);
    transform: translate(20px, -10px);
  }

  90% {
    clip-path: var(--slice-1);
    transform: translate(-10px, 0px);
  }

  100% {
    clip-path: var(--slice-1);
    transform: translate(0);
  }
}


h2 {
  padding: 16px 20px;
  box-shadow: 6px 0px 0px var(--cyan);
  background: linear-gradient(45deg, transparent 5%, var(--lavender) 5%);
}

h2:hover {
  animation: glitchEffect 0.3s;
  text-shadow: 0 0 8px currentColor;
}

section h2 {
  width: fit-content;
}

footer {
  background: rgba(44, 36, 58, 0.95);
  border-top: 1px solid var(--lavender);
  padding: 2rem;
  box-shadow: 0 0 20px rgba(207, 160, 255, 0.15);
  box-sizing: border-box;
  margin: 0;
  width: 100%;
  flex-shrink: 0;
  /* prevents footer from shrinking */
}



/* mobile view */

/* Mobile: Extra small screens (phones) */
@media (max-width: 640px) {
  body {
    padding-bottom: 40px;
  }

  header {
    padding: 15px 0;
  }

  header h1 {
    font-size: 24px;
    padding: 5px 10px;
  }

  .button-container {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
  }

  button,
  button::after {
    padding: 12px 16px;
    font-size: 14px;
    letter-spacing: 2px;
    box-shadow: 4px 0px 0px var(--cyan);
  }

  section {
    margin: 1rem auto;
    max-width: 95%;
    padding: 1.5rem;
    font-size: 14px;
  }

  main section a {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* Tablet: Small to medium screens */
@media (min-width: 641px) and (max-width: 1024px) {
  header {
    padding: 18px 0;
  }

  header h1 {
    font-size: 28px;
  }

  .button-container {
    gap: 15px;
  }

  button,
  button::after {
    padding: 14px 18px;
    font-size: 16px;
    box-shadow: 5px 0px 0px var(--cyan);
  }

  section {
    margin: 1.5rem auto;
    max-width: 85%;
    padding: 1.75rem;
  }
}

/* Desktop: Large screens */
@media (min-width: 1025px) {
  header {
    padding: 20px 0;
  }

  header h1 {
    font-size: 32px;
  }

  .button-container {
    gap: 20px;
  }

  button,
  button::after {
    padding: 16px 20px;
    font-size: 18px;
    box-shadow: 6px 0px 0px var(--cyan);
  }

  section {
    margin: 2rem auto;
    max-width: 90%;
    padding: 2rem;
  }
}

/* Extra large screens */
@media (min-width: 1440px) {
  section {
    max-width: 1200px;
  }

  main section a {
    padding: 18px 24px;
    font-size: 18px;
  }
}

/* Adjust for landscape on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  header {
    padding: 10px 0;
  }

  .button-container {
    gap: 8px;
    margin-top: 5px;
  }

  button,
  button::after {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* Touch devices (hide hover effects, use active states) */
@media (hover: none) and (pointer: coarse) {
  button:active {
    transform: scale(0.98);
  }

  main section a:active {
    text-shadow: 0 0 8px currentColor;
  }
}




/* articles */

/* articles */

/*.article {
  background: linear-gradient(135deg,
      var(--smokepurple),
      #2E273B);
  border: 2px solid var(--text-primary);
  padding: 2rem;
  position: relative;
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 246, 143, 0.2);
  border-radius: 4px;
  gap: 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}
.article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px);
  border-radius: 4px;
  z-index: 2;
}

.article::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  border-radius: 4px;
  z-index: 1;
}

.article * {
  position: relative;
  z-index: 3;
  animation-duration: 0.005s;
  animation-name: crtflicker;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.article h1 {
  font-family: 'Orbitron', monospace;
  color: var(--cyan);
  text-shadow:
    1px 0 0 var(--pink),
    -2px 0 0 var(--mint),
    0 0 10px rgba(127, 219, 255, 0.5);
  letter-spacing: 2px;
  font-weight: 900;
}

.article h2 {
  font-family: 'Orbitron', monospace;
  color: var(--mint);
  text-shadow:
    1px 0 0 var(--pink),
    -1px 0 0 var(--cyan),
    0 0 8px rgba(168, 255, 226, 0.5);
  letter-spacing: 1px;
}

.article h3 {
  font-family: 'Orbitron', monospace;
  color: var(--lavender);
  text-shadow: 0 0 6px rgba(203, 160, 255, 0.4);
}

.article p {
  font-family: 'Courier New', monospace;
  color: var(--text-primary);
}

.article a {
  color: var(--cyan);
  text-shadow: 0 0 5px rgba(127, 219, 255, 0.6);
}

.article a:hover {
  color: var(--mint);
  text-shadow: 0 0 10px var(--mint);
}

.article img {
  max-width: 100%;
  border: 2px solid var(--peach);
  border-radius: 2px;
  margin: 1.5rem 0;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 246, 143, 0.3);
  position: relative;
  display: block;
}

.article img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0.2) 1px,
      transparent 1px,
      transparent 2px);
  border-radius: 2px;
  z-index: 10;
}

.article img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  border-radius: 2px;
  z-index: 10;
}

@keyframes crtflicker {
  0% {
    text-shadow:
      0.5px 0 0 var(--pink),
      -1px 0 0 var(--mint),
      0 0 4px rgba(255, 246, 143, 0.3);
    opacity: 0.95;
  }

  50% {
    text-shadow:
      1px 0.25px 1px var(--pink),
      -0.5px -0.25px 1px var(--mint),
      0 0 6px rgba(255, 246, 143, 0.5);
  }

  100% {
    text-shadow:
      0.5px 0 0 var(--pink),
      -1px 0 0 var(--mint),
      0 0 4px rgba(255, 246, 143, 0.3);
    opacity: 1;
  }
}

.article .button-container {
  left: 0;
}
*/
.article button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  align-self: flex-start;
  margin-right: 10px;
  /* space between buttons */
  margin-bottom: 10px;
  /* space below buttons */
}

.article button a {
  display: contents;
  /* removes button a wrapper, lets content flow naturally */
}

.article button i {
  display: inline;
  /* overrides flex display */
  margin: 0;
}

h2 {
  width: fit-content;
}
