@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background-color: #0b0f14;
  color: #e5e7eb;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  line-height: 1.6;
  background: linear-gradient(rgba(8, 12, 18, 0.75), rgba(8, 12, 18, 0.85)), url('background.jpg') center/cover fixed no-repeat;
  scroll-behavior: smooth;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(124, 192, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.logo {
  color: #7cc0ff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.navbar {
  display: flex;
  gap: 6px;
}

.navbar a {
  position: relative;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: color .2s ease;
}

.navbar a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 124, 248, 0.0), rgba(122, 196, 255, 0.9), rgba(47, 124, 248, 0.0));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  transform: scaleX(1);
}

.navbar a:hover,
.navbar a.active {
  color: #7cc0ff;
  background: rgba(47, 124, 248, 0.10);
  box-shadow: inset 0 0 0 1px rgba(124, 192, 255, 0.25);
}

.nav-toggle {
  display: none;
  background: none;
  color: #cbd5e1;
  border: 0;
  font-size: 22px;
}

main {
  padding-bottom: 60px;
}

.home {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 64px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-title {
  font-size: 56px;
  line-height: 1.05;
  color: #e6f0ff;
  letter-spacing: 0.2px;
}

.accent {
  color: #2fb3ff;
}

.hero-sub {
  margin-top: 14px;
  font-size: 22px;
  color: #2fb3ff;
  font-weight: 700;
}

.hero-desc {
  margin-top: 14px;
  max-width: 620px;
  color: #b6cde3;
}

/* Text animations */
.animate-fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .7s ease forwards;
}

.animate-fade-delay {
  animation-delay: .15s;
}

.animate-fade-delay2 {
  animation-delay: .3s;
}

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

.home h1 {
  font-size: 44px;
  line-height: 1.15;
  color: #e2e8f0;
  margin: 8px 0 6px;
}

.home h3 {
  font-size: 18px;
  font-weight: 600;
  color: #9fb3c8;
}

.home p {
  margin-top: 12px;
  color: #b6c2cf;
}

.home-img img {
  width: 260px;
  height: 260px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(58, 160, 255, 0.35);
}

/* Animated avatar frame */
.avatar-frame {
  position: relative;
  width: 260px;
  height: 260px;
  display: grid;
  place-items: center;
  animation: floatY 6s ease-in-out infinite;
  scroll-margin-top: 90px;
  transition: transform .35s ease, opacity .3s ease;
}

.avatar-frame img {
  width: 220px;
  height: 220px;
  border-radius: 999px;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

/* blue-toned glow */
.avatar-glow {
  position: absolute;
  width: 94%;
  height: 94%;
  border-radius: 999px;
  background: conic-gradient(from 0deg, rgba(30, 144, 255, 0.10), rgba(58, 160, 255, 0.35), rgba(30, 144, 255, 0.10));
  filter: blur(10px);
  z-index: 1;
  animation: rotateGlow 10s linear infinite;
}

/* outer ring thicker, multi-color, no gap with inner image */
.avatar-frame::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  padding: 4px;
  background: conic-gradient(from 90deg, #2f7cf8, #3aa0ff, #6fb7ff, #2f7cf8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateGlow 6s linear infinite;
  opacity: 1;
}

/* subtle scanline */
.avatar-frame::after {
  content: '';
  position: absolute;
  width: 86%;
  height: 86%;
  border-radius: 999px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 0px, rgba(255, 255, 255, 0.06) 1px, transparent 2px, transparent 4px);
  filter: blur(0.2px);
  mix-blend-mode: overlay;
  z-index: 3;
  pointer-events: none;
}

/* removed orbit dot */

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floatY {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

.home-sci {
  display: flex;
  gap: 12px;
  margin: 18px 0 22px;
}

.home-sci a {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(124, 192, 255, 0.35);
  color: #7cc0ff;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
  font-size: 22px;
}

.home-sci a:hover {
  background: rgba(58, 160, 255, 0.15);
  transform: translateY(-2px);
}

.btn-box {
  display: inline-block;
  background: linear-gradient(90deg, #2f7cf8, #3aa0ff);
  color: #0b0f14;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-box:hover {
  filter: brightness(0.95);
}

.btn-ghost {
  background: transparent;
  color: #7cc0ff;
  border: 1px solid rgba(124, 192, 255, 0.35);
  margin-left: 10px;
}

.btn-ghost:hover {
  background: rgba(58, 160, 255, 0.12);
}

.section {
  padding: 32px 0;
  border-top: 0;
  position: relative;
  scroll-margin-top: 90px;
  min-height: auto;
  display: block;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #e2e8f0;
}

.section p {
  color: #b6c2cf;
}

.section::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: calc(100% - 40px);
  max-width: 1000px;
  height: 3px;
  background: linear-gradient(90deg, #2f7cf8, #7cc0ff, #3aa0ff, #2f7cf8);
  background-size: 300% 100%;
  animation: lineShift 8s linear infinite;
  opacity: 0.75;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

@keyframes lineShift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
  margin-top: 16px;
}

.skills-list li {
  background: rgba(32, 74, 135, 0.18);
  border: 1px solid rgba(124, 192, 255, 0.18);
  padding: 12px 14px;
  border-radius: 10px;
  color: #d2dae3;
}

/* About info box */
.info-box {
  margin-top: 14px;
  background: rgba(16, 38, 64, 0.5);
  border: 1px solid rgba(80, 160, 220, 0.35);
  padding: 16px;
  border-radius: 12px;
  color: #c6d5e6;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 24px;
  position: relative;
}

.project-card {
  position: relative;
  background: rgba(16, 38, 64, 0.45);
  border: 1px solid rgba(80, 160, 220, 0.35);
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.project-card h3 {
  margin-bottom: 6px;
}

/* accent line outside the card */
.project-card::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: #2fb3ff;
  border-radius: 2px;
}

.project-card::after {
  content: '';
  position: absolute;
  left: -22px;
  top: 20px;
  width: 10px;
  height: 10px;
  background: #2fb3ff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(47, 179, 255, 0.6);
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.post-card {
  background: rgba(32, 74, 135, 0.18);
  border: 1px solid rgba(124, 192, 255, 0.18);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-card a {
  color: #a7f3d0;
  text-decoration: none;
  font-weight: 700;
}

.post-card .meta {
  font-size: 12px;
  color: #93a3b4;
}

/* Global Tag Styling */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  color: #9fb3c8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
}

/* CTF resources grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.resource-card {
  background: rgba(16, 38, 64, 0.45);
  border: 1px solid rgba(80, 160, 220, 0.35);
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #d7e2ee;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .15s ease, background .15s ease;
}

.resource-card:hover {
  background: rgba(32, 74, 135, 0.32);
  transform: translateY(-2px);
}

.resource-card h3 {
  color: #e2e8f0;
}

.resource-card p {
  color: #b6c2cf;
}

.resource-card.disabled {
  pointer-events: none;
  opacity: 0.7;
  background: rgba(32, 40, 52, 0.35);
  border-style: dashed;
}

/* removed dynamic avatar layout */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 10px;
}

.contact-list a {
  color: #cbd5e1;
  text-decoration: none;
}

.contact-list a:hover {
  color: #a7f3d0;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 20px;
  color: #94a3b8;
  text-align: center;
  background: rgba(13, 17, 23, 0.75);
}

@media (max-width: 860px) {
  .home {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }

  .home-img {
    order: -1;
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .navbar {
    display: none;
    position: absolute;
    right: 12px;
    top: 56px;
    background: rgba(13, 17, 23, 0.98);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
  }

  .navbar.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-block;
  }
}

/* Achievements Section */
.achievement-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Discord Contact Styling */
#copy-btn:hover {
  background: rgba(47, 179, 255, 0.1) !important;
  box-shadow: 0 0 10px rgba(47, 179, 255, 0.3) !important;
}