/* NORMALIZE */
* { 
  box-sizing: border-box;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { border-style: none; }

/* Custom selection */
::-moz-selection { background: #FFCCFF; }
::selection { background: #FFCCFF; }

/* Styles */
body {
  background: #F5F5F5;
  color: #000;
  font-family: "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  font-weight: 400;
  line-height: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6rem;
  margin: 0;
}

h1 {
  max-width: 25rem;
  color: #000;
  text-align: center;
  font-family: "Noto Serif", serif;
  font-style: italic;
  font-weight: 350;
  font-optical-sizing: auto;
  font-size: 1.15rem;
  line-height: 1.7rem;
  margin-top: 12rem;
  padding: 0 1rem;
}

p {
  color: #2E3338;
  font-size: 1rem;
  margin: 0;
  padding: 0;
}

a {
  color: black;
  text-decoration: none;
  font-weight: 500;
}

a:active,
a:hover { 
  color: #EE33FF; 
  text-decoration: underline !important;
  text-decoration-style: wavy !important;
  text-decoration-thickness: 0.2px !important;
  text-underline-offset: 4px !important;
  text-decoration-color: #EE33FF !important;
}

/* Nav */
.nav {
  display: flex;
  width: fit-content;
  padding: .25rem;
  margin: .25rem auto;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  border-radius: 2rem;
  background: rgba(245, 245, 245, 0.65);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  z-index: 100;
}

.nav button {
  border: none;
  text-align: center;
  min-width: 5rem;
  padding: .75rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  background: none;
  color: #000;
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 500;
  line-height: 1.5;
}

.nav button:hover {
  background: white;
  color: #e84fff;
}

#about {
  max-width: 505px;
  margin-top: 8rem;
  display: none;
  padding: 0 1rem;
}

#about p {
  margin-bottom: 1.5rem;
}

/* WORK */
#work {
  flex-direction: column;
  align-items: center;
  gap: 6rem;
  padding: 0 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  max-width: 20rem;
  justify-content: center;
  cursor: default;
}

.tag {
  padding: 3px 12px 4px;
  border-radius: 1rem;
  border: 1px solid #D9D9D9;
  background: #EDEDED;
  color: #000;
  text-align: center;
  font-size: .9rem;
  line-height: normal;
}

.projects {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column-gap: 16px;
  margin-top: 5rem;
  margin-bottom: 1rem;
}

.card {
  width: 100%;
  margin-bottom: 1.5rem;
}

.card:nth-of-type(3n-7) { 
  margin-top: -5rem; 
}

.img-container {
  display: block;
  border-radius: 1.5rem;
  max-width: 100%;
  height: 32rem;
  background: #0d0d0d;
  object-fit: contain;
  overflow: hidden;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.img-container img.contain {
  object-fit: contain;
}

.img-container img:hover {
  transform: scale(1.1);
  filter: saturate(1.05);
}

.card:hover img.cover {
  background-size: 110%; 
}

.info-container {
  display: flex;
  justify-content: space-between;
  padding: .3rem .75rem;
  
}

.info-container p {
  color: #707070;
  white-space: nowrap;
  font-size: .75rem;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: default;
}

.info-container span {
  display: none;
}


/* Contact */
.contact {
  display: flex;
  gap: -1rem;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.contact a { margin: 0 -.3rem; }
.contact a:hover {  z-index: 10;  }
.contact a path {  fill: none;  }

.github:hover path,
.github:active path,
.github:focus path { fill: #24292F; }

.x:hover path,
.x:active path,
.x:focus path { fill: #000; }

.goodreads:hover path,
.goodreads:active path,
.goodreads:focus path { fill: #e5debc; }

.store:hover path,
.store:active path,
.store:focus path { fill: #FAC2FF; }

.substack:hover path,
.substack:active path,
.substack:focus path { fill: #ff7b3a; }

footer p {
  padding: .75rem;
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .5px;
}

.img-container {
  position: relative;
  /* cursor: pointer; */
}

a.img-container {
  cursor: pointer;
}

.follow-div {
  /* color: #161316; */
  color: #000;
  white-space: nowrap;
  font-size: .7rem;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;

  width: fit-content;
  border-radius: 1rem;
  background-color: white;
  background: rgba(253, 253, 253, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.15);
  
  position: absolute;
  pointer-events: none;
  z-index: 100;
  display: none;
  margin-top: 40px;
  padding: .1rem .6rem;

  transition: transform 0.3s ease-out; /* Slower transition */

}

@media only screen and (max-width: 1024px) {
  /* body { background: #FFCCFF; } */
  body, #work { gap: 5rem; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .card:nth-of-type(3n-7) { margin-top: 0; }
  .card:nth-of-type(even) { margin-top: -5rem; }
}

@media only screen and (max-width: 600px) { 
  /* body { background: #e84fff; } */
  body, #work { gap: 4rem; }
  .img-container { height: 26rem; }
  .projects { grid-template-columns: 1fr; }
  .card:nth-of-type(3n-7) { margin-top: 0; }
  .card:nth-of-type(even) { margin-top: 0; }
}
