h1 {
  color: rgb(255, 255, 255);
  font-family: Inter, Helvetica, sans-serif;
  font-size: 48px;
  margin-bottom: 0;
  margin-left: -3px;
  margin-right: 0;
}

h4 {
  color: rgb(255, 255, 255);
  font-family: Inter, Helvetica, sans-serif;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

p {
  color: rgb(255, 255, 255);
  font-family: Inter, Helvetica, sans-serif;
  margin-left: 0;
  margin-right: 0;
}

.projbutton {
  color: rgb(0, 0, 0);
  font-family: Inter, Helvetica, sans-serif;
  height: 50px;
  width: 150px;
  text-align: left;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.linkbutton {
  background-color:rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  border: 1px solid white;
  border-radius: 8px;
  font-family: Inter, Helvetica, sans-serif;
  height: 50px;
  width: 150px;
  text-align: left;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.linkbutton, .projbutton {
  transition: transform 0.15s ease;
}

.linkbutton:hover, .projbutton:hover {
  transform: translateY(-2px);
}

@media (max-width: 520px) {
  .projbutton, .linkbutton {
    width: 50px;
    justify-content: center;
    padding: 0;
  }

  .buttontext {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.maindiv {
  width: fit-content;
  margin: 0 auto;
  text-align: left;
  padding: 0 24px;
}

.maindiv > center {
  display: flex;
  gap: 2px;
}

body {
  background-color: rgb(0, 0, 0);
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Project Page CSS */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.project-card {
  display: block;
  text-decoration: none;
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: white;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.project-card h3 {
  margin: 12px 12px 4px;
  font-family: Inter, Helvetica, sans-serif;
}

.project-card p {
  margin: 0 12px 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 800px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.projectdiv {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.project-card {
     transition: all 0.2s ease-in-out;
}

.project-card:hover {
  color: rgba(255, 255, 255, 1);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.5);
}

.backbutton {
  color: rgb(0, 0, 0);
  font-family: Inter, Helvetica, sans-serif;
  height: 40px;
  width: 120px;
  text-align: left;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
}

.pageheader {
  display: flex;
  align-items: center;
  gap: 16px;
}

.backbutton {
  transition: transform 0.15s ease;
}

.backbutton:hover {
  transform: translateY(-2px);
}

.writeupbutton {
  color: rgb(0, 0, 0);
  font-family: Inter, Helvetica, sans-serif;
  height: 50px;
  width: 100%;
  text-align: left;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.writeupbutton {
  transition: transform 0.15s ease;
}

.writeupbutton:hover {
  transform: translateY(-2px);
}

.bottombuttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.bottombuttons .writeupbutton {
  flex: 1;
}

/* Links Page CSS */

.linkbutton-2 {
  background-color:rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  border: 1px solid white;
  border-radius: 8px;
  font-family: Inter, Helvetica, sans-serif;
  height: 50px;
  width: 50px;
  text-align: left;
  font-size: 26px;
  gap: 8px;
}

.linkbutton-2 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.linkbutton-2 {
  transition: transform 0.15s ease;
}

.linkbutton-2:hover {
  transform: translateY(-2px);
}

.linkbutton-back {
  background-color:rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  border: 1px solid white;
  border-radius: 8px;
  font-family: Inter, Helvetica, sans-serif;
  height: 50px;
  width: 50px;
  text-align: left;
  font-size: 26px;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ripple CSS */

#ripples {
    position: fixed;
    inset: 0;
    width: 100%;
    height:100%;
    pointer-events: none;
    z-index: -1;
}

/* Writeups CSS */

.writeupdiv {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.writeup-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.writeupcard {
  display: block;
  text-decoration: none;
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  font-family: Inter, Helvetica, sans-serif;
  padding: 18px;
}

.writeup-top {
  justify-content: space-between;
  display: flex;
  align-items: baseline;
}

.writeupcard p {
  margin: 0 0 0;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.writeupcard time { 
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

.tags {
  display: flex;
  padding-top: 8px;
}

.tag {
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}

.writeupcard h3 {
  margin: 0 0 4px;
}

.writeupcard:hover {
  transform: translateY(-2px);
  border-color: white;
  color: rgba(255, 255, 255, 1);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.5);
}

/* actual Writeups CSS */

.writeup {
  width: 100%;
  max-width: 80ch;
  margin: 0 auto;
  padding: 32px 24px 96px;
  box-sizing: border-box;
  color: white;
  font-family: Inter, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

.writeup h1 {
  margin-top: 24px;
  line-height: 1.2;
}

.writeup time {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

.writeup .tags {
  margin-bottom: 24px;
}

/* Crescent Button CSS */

.crescentbutton {
  display: flex;
  align-items: center;
  margin-top: 36px;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  background: #5f34b0;
  color: #f4ecd8;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Crescent Button stars */
.crescentbutton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 25%, #f4ecd8 1px, transparent 1.5px),
    radial-gradient(circle at 30% 60%, #f4ecd8 1px, transparent 1.5px),
    radial-gradient(circle at 48% 18%, #f4ecd8 1px, transparent 1.5px),
    radial-gradient(circle at 70% 15%, #f4ecd8 1px, transparent 1.5px),
    radial-gradient(circle at 85% 22%, #f4ecd8 1px, transparent 1.5px),
    radial-gradient(circle at 92% 55%, #f4ecd8 1px, transparent 1.5px),
    radial-gradient(circle at 22% 40%, #f4ecd8 1px, transparent 1.5px);
  animation: cb-twinkle 3s ease-in-out infinite alternate;
}

/* Crescent Button stars */
.crescentbutton::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 30% 45% at 10% 115%, #8a46bd 98%, transparent 100%),
    radial-gradient(ellipse 35% 50% at 55% 125%, #8a46bd 98%, transparent 100%),
    radial-gradient(ellipse 40% 60% at 30% 120%, #4a2a94 98%, transparent 100%),
    radial-gradient(ellipse 40% 60% at 85% 125%, #4a2a94 98%, transparent 100%);
  background-size: 200px 100%;
  background-repeat: repeat-x;
  animation: cb-drift 14s linear infinite;
}