@import url('https://fonts.googleapis.com/css?family=Karla:400,700&display=swap');

:root {
--bgColor: #223344;
--bgColor2: #090a0f;
--accentColor: #ffffff;
--font: 'Karla', sans-serif;
--delay: 0.3s;
--transition: 0.25s ease;
--radius: 10px;
}

* {
  box-sizing: border-box;
  }

html {
min-height: 100%;
}

body {
min-height: 100vh;
min-height: 100svh;
margin: 0;
padding: 0;
overflow-x: hidden;
position: relative;
isolation: isolate;
font-family: var(--font);
color: var(--accentColor);
background: radial-gradient(ellipse at bottom, var(--bgColor) 0%, var(--bgColor2) 100%);
background-repeat: no-repeat;
background-size: cover;
opacity: 0;
animation: pageFadeIn 1s ease-out var(--delay) forwards;
}

a {
color: inherit;
}

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

#profilePicture {
position: relative;
z-index: 1;
display: block;
width: 96px;
height: 96px;
margin: 40px auto 20px;
border-radius: 50%;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
}

#profilePicture img {
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
transition: transform var(--transition), box-shadow var(--transition);
}

#profilePicture:hover img,
#profilePicture:focus-visible img {
transform: scale(1.04);
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

#userName {
position: relative;
z-index: 1;
width: 100%;
margin: 0 auto;
padding: 0 16px;
color: var(--accentColor);
font-family: var(--font);
font-size: 1rem;
font-weight: 700;
line-height: 1.4;
text-align: center;
}

#links {
position: relative;
z-index: 1;
display: block;
width: min(675px, calc(100% - 20px));
margin: 27px auto;
}

.link {
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 0.25rem;
width: 100%;
margin: 0 0 10px;
padding: 10px 14px;
border: 2px solid var(--accentColor);
border-radius: var(--radius);
background-color: transparent;
color: var(--accentColor);
font-size: 1rem;
line-height: 1.3;
text-align: center;
text-decoration: none;
transition: background-color var(--transition), color var(--transition), transform var(--transition);
-webkit-tap-highlight-color: transparent;
}

.link:hover,
.link:focus-visible,
.link:active {
background-color: var(--accentColor);
color: var(--bgColor);
}

.link:hover,
.link:focus-visible {
transform: translateY(-1px);
}

.link:focus-visible,
.popup-close:focus-visible,
.built-by:focus-visible {
outline: 3px solid rgba(255, 255, 255, 0.45);
outline-offset: 3px;
}

#hashtag {
position: relative;
z-index: 1;
display: block;
width: 100%;
padding: 0 16px 20px;
overflow: hidden;
color: var(--accentColor);
font-family: var(--font);
font-size: 1rem;
text-align: center;
background: linear-gradient(90deg, var(--bgColor), var(--accentColor), var(--bgColor));
background-repeat: no-repeat;
background-size: 80%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: textShine 3s linear var(--delay) infinite;
}

.overlay {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
overflow: auto;
visibility: hidden;
opacity: 0;
background-color: rgba(0, 0, 0, 0.7);
transition: opacity 0.4s ease, visibility 0.4s ease;
}

.overlay:target {
visibility: visible;
opacity: 1;
}

.popup {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
width: min(400px, 100%);
max-height: calc(100vh - 48px);
overflow: visible;
background-color: var(--bgColor);
border-radius: var(--radius);
transform: translateY(-24px) scale(0.92);
transition: transform 0.4s ease;
}

.overlay:target .popup {
transform: translateY(0) scale(1);
}

.popup-photo {
display: flex;
width: 100%;
}

.popup-photo img {
display: block;
width: 100%;
height: auto;
border-radius: var(--radius) var(--radius) 0 0;
}

.popup-quote {
padding: 20px;
color: var(--accentColor);
font-family: Baskerville, Georgia, serif;
font-size: 1rem;
font-style: italic;
line-height: 1.45;
text-align: center;
}

.popup-close {
position: absolute;
top: -1rem;
right: -1rem;
z-index: 110;
display: grid;
place-items: center;
width: 3rem;
height: 3rem;
border-radius: 50%;
background-color: var(--bgColor);
color: var(--accentColor);
font-size: 1.7rem;
font-weight: 400;
line-height: 1;
text-align: center;
text-decoration: none;
cursor: pointer;
transition: background-color var(--transition), color var(--transition);
-webkit-tap-highlight-color: transparent;
}

.popup-close:hover,
.popup-close:focus-visible,
.popup-close:active {
background-color: var(--accentColor);
color: var(--bgColor);
}

.built-by {
position: fixed;
left: 50%;
bottom: 10px;
z-index: 50;
transform: translateX(-50%);
padding: 8px 15px;
border-radius: 20px;
background: rgba(0, 0, 0, 0.6);
color: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(5px);
font-size: 0.9rem;
font-weight: 700;
text-decoration: none;
white-space: nowrap;
transition: background-color var(--transition), color var(--transition);
}

.built-by:hover,
.built-by:focus-visible {
background: rgba(0, 0, 0, 0.8);
color: #ffd700;
}

.animated-background {
position: fixed;
inset: 0;
z-index: 0;
overflow: hidden;
pointer-events: none;
}

#stars1,
#stars2,
#stars3 {
position: absolute;
inset: -100vh 0 0;
background-repeat: repeat;
will-change: transform;
}

#stars1 {
--star-travel: -240px;
opacity: 0.85;
background-image:
radial-gradient(circle at 20px 30px, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.4px),
radial-gradient(circle at 120px 90px, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.4px),
radial-gradient(circle at 210px 180px, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.4px);
background-size: 240px 240px;
animation: starDrift 120s linear infinite;
}

#stars2 {
--star-travel: -360px;
opacity: 0.65;
background-image:
radial-gradient(circle at 80px 45px, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 2px),
radial-gradient(circle at 260px 160px, rgba(255, 255, 255, 0.65) 0 1.5px, transparent 2px),
radial-gradient(circle at 330px 300px, rgba(255, 255, 255, 0.8) 0 1.5px, transparent 2px);
background-size: 360px 360px;
animation: starDrift 180s linear infinite;
}

#stars3 {
--star-travel: -520px;
opacity: 0.5;
background-image:
radial-gradient(circle at 150px 120px, rgba(255, 255, 255, 0.8) 0 2px, transparent 2.6px),
radial-gradient(circle at 400px 260px, rgba(255, 255, 255, 0.6) 0 2px, transparent 2.6px),
radial-gradient(circle at 90px 430px, rgba(255, 255, 255, 0.75) 0 2px, transparent 2.6px);
background-size: 520px 520px;
animation: starDrift 240s linear infinite;
}

@keyframes pageFadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}

to {
opacity: 1;
transform: translateY(0);
}
}

@keyframes textShine {
from {
background-position: -500%;
}

to {
background-position: 500%;
}
}

@keyframes starDrift {
from {
transform: translate3d(0, 0, 0);
}

to {
transform: translate3d(0, var(--star-travel), 0);
}
}

@media (max-width: 480px) {
#profilePicture {
margin-top: 30px;
}

.popup-close {
top: 0.5rem;
right: 0.5rem;
}

.built-by {
max-width: calc(100% - 20px);
overflow: hidden;
text-overflow: ellipsis;
}
}

@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}

body {
opacity: 1;
}
}
