:root {
  --bg: #000000;
  --bg-soft: #050509;
  --fg: #f5f5f5;
  --muted: #9797a5;
  --accent: #b94cff;
  --border: #191922;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #11111a 0, #000000 55%);
  color: var(--fg);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
  z-index: 0;
}

.frame {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

@media (min-width: 768px) {
  .frame {
    padding: 3.5rem 0 4rem;
  }
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  margin-bottom: 2.8rem;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.logo {
  font-family: "Press Start 2P", system-ui, monospace;
  font-size: 1.9rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  position: relative;
  animation: logoGlow 5s ease-in-out infinite;
}

.tagline {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 26rem;
}

.skull-wrap {
  padding: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 30% 0, #222232 0, #050509 55%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 28px rgba(0, 0, 0, 0.9);
}

.skull {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 999px;
  image-rendering: pixelated;
}

@media (max-width: 540px) {
  .logo {
    font-size: 1.4rem;
  }

  .skull {
    width: 96px;
    height: 96px;
  }
}

.card {
  position: relative;
  background: radial-gradient(circle at top left, #161623 0, #050509 55%);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 40px rgba(0, 0, 0, 0.7);
  margin-bottom: 1.4rem;
  overflow: hidden;
  transition:
    transform 160ms ease-out,
    border-color 160ms ease-out,
    box-shadow 160ms ease-out,
    background 160ms ease-out;
}

.card::before {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 18% 20%, rgba(185, 76, 255, 0.1) 0, transparent 70%),
    radial-gradient(circle at 80% 30%, rgba(185, 76, 255, 0.08) 0, transparent 75%),
    radial-gradient(circle at 25% 85%, rgba(185, 76, 255, 0.06) 0, transparent 75%);
  filter: blur(32px);
  opacity: 0.13;
  animation: cardSmoke 32s ease-in-out infinite;
}

.card::after {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at 0 0, rgba(185, 76, 255, 0.06), transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.85), transparent 75%);
  opacity: 0.22;
  animation: cardGlow 24s ease-in-out infinite alternate;
}

@keyframes cardSmoke {
  0% {
    transform: translate3d(-5%, -4%, 0) scale(1);
    opacity: 0.11;
  }
  25% {
    transform: translate3d(3%, -2%, 0) scale(1.03);
    opacity: 0.14;
  }
  50% {
    transform: translate3d(6%, 5%, 0) scale(1.02);
    opacity: 0.12;
  }
  75% {
    transform: translate3d(-3%, 4%, 0) scale(1.04);
    opacity: 0.15;
  }
  100% {
    transform: translate3d(-5%, -4%, 0) scale(1);
    opacity: 0.11;
  }
}

@keyframes cardGlow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.18;
  }
  50% {
    transform: translate3d(4px, -3px, 0) scale(1.02);
    opacity: 0.28;
  }
  100% {
    transform: translate3d(-3px, 4px, 0) scale(1.01);
    opacity: 0.20;
  }
}

@keyframes logoGlow {
  0% {
    text-shadow: 0 0 0 rgba(185, 76, 255, 0);
    opacity: 0.9;
  }
  50% {
    text-shadow:
      0 0 10px rgba(185, 76, 255, 0.85),
      0 0 20px rgba(185, 76, 255, 0.45);
    opacity: 1;
  }
  100% {
    text-shadow: 0 0 0 rgba(185, 76, 255, 0);
    opacity: 0.9;
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 6px rgba(185, 76, 255, 0.5),
                0 0 12px rgba(185, 76, 255, 0.2);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 12px rgba(255, 120, 255, 0.85),
                0 0 22px rgba(185, 76, 255, 0.45);
    filter: brightness(2);
  }
  100% {
    box-shadow: 0 0 6px rgba(185, 76, 255, 0.5),
                0 0 12px rgba(185, 76, 255, 0.2);
    filter: brightness(1);
  }
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(185, 76, 255, 0.3);
  box-shadow:
    0 0 0 1px rgba(185, 76, 255, 0.15),
    0 22px 50px rgba(0, 0, 0, 0.9);
}

.card:hover::before {
  opacity: 0.18;
}

.now {
  margin-bottom: 1.8rem;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.grid .card {
  margin-bottom: 0;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  }

  .grid .card:last-child {
    grid-column: 1 / -1;
  }
}

h2,
h3 {
  margin: 0 0 0.55rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.06em;
}

h2 {
  font-size: 0.95rem;
}

h3 {
  font-size: 0.9rem;
}

p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #d0d0dc;
}

.card p,
.card h2,
.card h3,
.card li,
.card span {
  cursor: text;
}

#pentest-live {
  color: #39ff14;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.9);
  font-weight: 500;
}

#links {
  margin-bottom: 1.6rem;
  margin-top: 0;
}

#friends {
  margin-bottom: 0;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.link-list a {
  position: relative;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.link-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 1px;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  transition: transform 160ms ease-out;
}

.link-list a:hover::after,
.link-list a:focus-visible::after {
  transform: scaleX(1);
}

.link-list a:hover,
.link-list a:focus-visible {
  outline: none;
  color: #ffffff;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.9;
}

.foot span {
  white-space: nowrap;
}

@media (max-width: 540px) {
  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.8fr);
  gap: 1.6rem;
  align-items: flex-start;
}

.left-column .card {
  margin-bottom: 1.4rem;
}

.right-column .card {
  margin-bottom: 1.4rem;
}

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

#certs .cert-item {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cert-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cert-name {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2e2f4;
}

.cert-progress-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cert-progress-bar {
  position: relative;
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #151521;
  overflow: hidden;
}

.cert-progress-fill {
  position: absolute;
  inset: 0;
  width: var(--cert-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ff7bff);
  box-shadow: 0 0 8px rgba(185, 76, 255, 0.7);
  animation: pulseGlow 2.6s ease-in-out infinite;
}

.cert-progress-text {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 2.4rem;
  text-align: right;
}

@media (max-width: 420px) {
  .frame {
    padding: 1.8rem 1rem 2.5rem;
  }

  .hero {
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.2rem;
  }

  .logo {
    font-size: 1.35rem;
    letter-spacing: 0.09em;
  }

  .tagline {
    font-size: 0.85rem;
    max-width: 20rem;
  }

  .skull {
    width: 80px;
    height: 80px;
  }

  .card {
    padding: 1rem 1rem 1.1rem;
  }

  .card p {
    font-size: 0.85rem;
    line-height: 1.48;
    word-break: break-word;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .link-list {
    gap: 0.5rem 1rem;
  }

  .link-list a {
    font-size: 0.85rem;
  }

  .foot {
    font-size: 0.75rem;
    gap: 0.3rem;
  }
}

.cert-logo {
  position: relative;
  width: 100px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
}

.cert-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("cpts.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: grayscale(1) opacity(0.4);
}

.cert-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("cpts.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  clip-path: inset(0 calc(100% - var(--cert-progress)) 0 0);
  animation: colorPulse 2.6s ease-in-out infinite;
}

@keyframes colorPulse {
  0% {
    filter: grayscale(1) opacity(0.4);
  }
  50% {
    filter: grayscale(0) opacity(1)
            drop-shadow(0 0 5px rgba(185, 76, 255, 0.8));
  }
  100% {
    filter: grayscale(1) opacity(0.4);
  }
}

@media (max-width: 340px) {
  .logo {
    font-size: 1.15rem;
  }

  .tagline {
    font-size: 0.78rem;
  }

  .skull {
    width: 70px;
    height: 70px;
  }

  .card {
    padding: 0.9rem 0.85rem 1rem;
  }

  .card p {
    font-size: 0.8rem;
  }

  #pentest-live {
    font-size: 0.78rem;
  }
}

