:root {
  --accent: #9d4edd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7rem;
  font-family: 'Rambla', sans-serif;
  color: #e8dcc8;
  background: linear-gradient(135deg, #0a0a14 0%, #0d0d1a 50%, #110d1f 100%);
  animation: fadeIn 0.4s ease-in;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 1rem;
  background-color: #0a0a14;
}

nav, main {
  position: relative;
  z-index: 2;
}

nav a {
  display: inline-block;
  min-width: 9rem;
  padding: 0.5rem 1rem;
  border-radius: 0.2rem;
  text-align: center;
  text-decoration: none;
  color: #e8dcc8;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: transform 0.1s ease-out, color 0.1s ease-out;
}

nav a[aria-current='page'] {
  color: var(--accent);
  background-color: transparent;
}

nav a:hover {
  transform: scale(1.05);
}

main {
  padding: 1rem;
}

main a {
  color: rgb(237, 212, 178);
}

main a:hover {
  color: var(--accent);
}

main a:active {
  color: #ff8c00;
}

main a:visited {
  color: #b89fd4;
}

.avatar-wrap {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  box-shadow: 0 0 80px 30px rgba(157, 78, 221, 0.25);
  flex-shrink: 0;
}

main img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
}

.content-wrapper {
  padding: 1.5rem;
}

h1 {
  font-family: 'BIZ UDMincho', serif;
  font-size: 4.5rem;
  font-weight: 300;
  text-align: left;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 0;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0;
  margin-bottom: 2rem;
}

.filters button {
  background-color: #080810;
  border: none;
  border-radius: 0;
  padding: 1rem 2.5rem;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8dcc8;
  transition: box-shadow 0.1s ease-out, transform 0.1s ease-out, opacity 0.1s ease-out 0.05s, filter 0.1s ease-out 0.05s;
}

.filters button:hover {
  background-color: #080810;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(157, 78, 221, 0.15)
  transform: scale(1.05);
}

.filters button.active {
  background-color: #080810;
  color: var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(157, 78, 221, 0.2);
}

.filters:has(button:hover) button {
  opacity: 0.4;
  filter: blur(1px);
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out, opacity 0.3s ease-out 0.05s, filter 0.3s ease-out 0.05s;
}

.filters:has(button:hover) button:hover {
  opacity: 1;
  filter: blur(0);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.project-card {
  position: relative;
  z-index: 1;
  background-color: #080810;
  border: none;
  border-radius: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out, opacity 0.3s ease-out 0.05s, filter 0.3s ease-out 0.05s;
}

.project-card:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(157, 78, 221, 0.1);
}

.project-grid:has(.project-card:hover) .project-card {
  opacity: 0.4;
  filter: blur(2px);
  transform: none;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out, opacity 0.3s ease-out 0.05s, filter 0.3s ease-out 0.05s;
}

.project-grid:has(.project-card:hover) .project-card:hover {
  opacity: 1;
  filter: blur(0);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(157, 78, 221, 0.15);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.tech {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  border: solid 1px;
  margin-top: 0.5rem;
}

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  position: relative;
}

/*
.hero::before {
  content: 'Garrin Costa, Jr.';
  position: absolute;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18rem;
  font-weight: 600;
  color: #ffffff;
  opacity: 0.015;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
}
*/

.hero-text {
  position: relative;
  z-index: 1;
}

.cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border: solid 1px var(--accent);
  border-radius: 0.3rem;
  text-decoration: none;
  transition: transform 0.1s ease-out;
}

.cta:hover {
  transform: scale(1.05);
}

.contact {
  padding: 2rem 1.5rem;
}

.contact h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.contact-links {
  display: flex;
  gap: 2rem;
}

.contact-links a {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-links a, 
.contact-links a:visited {
  color: #e8dcc8
}

.contact-links a:hover {
  color: var(--accent);
  transform: scale(1.05);
}

.contact-links a:active {
  color: #ff8c00;
}

#hex-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 5%, rgba(0,0,0,0.8) 25%, rgba(0,0,0,1) 40%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 5%, rgba(0,0,0,0.8) 25%, rgba(0,0,0,1) 40%);
  transition: opacity 0.15s ease-out, filter 0.15s ease-out;
}

body:has(.filters button:hover) #hex-bg,
body:has(.project-card:hover) #hex-bg,
body:has(.cta:hover) #hex-bg,
body:has(.contact-links a:hover) #hex-bg {
  opacity: 0.3;
  filter: blur(2px);
}

h2 {
  font-family: 'BIZ UDMincho', serif;
  color: #ffffff;
}

@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  nav {
    gap: 0.5rem;
  }

  nav a {
    min-width: 6rem;
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}