:root {
  --bg: #02030d;
  --bg-alt: rgba(10, 14, 40, 0.85);
  --accent: #4ade80; /* verde accent */
  --accent-soft: rgba(74, 222, 128, 0.35);
  --text: #f5f7ff;
  --muted: #9ca3c7;
  --card-border: rgba(255, 255, 255, 0.07);
  --glass: rgba(16, 24, 56, 0.85);
  --danger: #ff6b8b;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.6);
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1530 0, #02030d 50%, #000 100%);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

/* subtle noise overlay */
.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.15;
  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='.8' numOctaves='2' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: -1;
}

/* TOP NAV */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 6vw;
  background: linear-gradient(
    to bottom,
    rgba(2, 3, 13, 0.96),
    rgba(2, 3, 13, 0.85),
    transparent
  );
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo-mark {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  background: radial-gradient(circle at top, #064e3b, #050715); /* verde în loc de albastru */
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding-bottom: 0.15rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* HERO */
.hero {
  min-height: 70vh;
  padding: 6rem 6vw 4rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.7rem, 4.2vw, 3.8rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

.hero-title .accent {
  display: block;
  background: linear-gradient(120deg, #4ade80, #22c55e); /* gradient verde */
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 30rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-tags span {
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: rgba(5, 30, 20, 0.85); /* verde închis */
  border: 1px solid rgba(74, 222, 128, 0.3); /* contur verde */
}

/* HERO ACTIONS (CTAs) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.05rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 24, 18, 0.55); /* tweak spre verde */
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 0%, rgba(74, 222, 128, 0.35), transparent 60%),
    radial-gradient(circle at 90% 90%, rgba(190, 242, 100, 0.28), transparent 55%); /* verde + lime */
  opacity: 0.6;
  pointer-events: none;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(120deg, rgba(74, 222, 128, 0.28), rgba(34, 197, 94, 0.22));
  border-color: rgba(74, 222, 128, 0.38);
}

.btn-secondary {
  background: rgba(6, 24, 18, 0.7);
  border-color: rgba(34, 197, 94, 0.22);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.65);
  border-color: rgba(74, 222, 128, 0.55);
}

.btn:active {
  transform: translateY(0px);
}

.btn-icon {
  opacity: 0.9;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover .btn-icon {
  transform: translate(2px, -2px);
  opacity: 1;
}

@media (max-width: 520px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    justify-content: space-between;
  }
}

/* Hero orbits */
.hero-orbit {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 10%, #22c55e 0, transparent 50%),
    radial-gradient(circle at 80% 80%, #16a34a 0, transparent 55%),
    radial-gradient(circle at 50% 50%, #020617 0, #020617 60%, transparent 100%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

/* floating orbs */
.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.7;
  animation: float 10s ease-in-out infinite alternate;
}

.orb-1 {
  width: 120px;
  height: 120px;
  background: rgba(74, 222, 128, 0.7); /* verde */
  top: 16%;
  left: 18%;
}

.orb-2 {
  width: 80px;
  height: 80px;
  background: rgba(190, 242, 100, 0.7); /* lime-verzui */
  top: 58%;
  right: 12%;
  animation-delay: -3s;
}

.orb-3 {
  width: 150px;
  height: 150px;
  background: rgba(34, 197, 94, 0.7); /* verde mai închis */
  bottom: 8%;
  left: 40%;
  animation-delay: -6s;
}

/* SECTIONS */
.section {
  padding: 4rem 6vw;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.section-header {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.section-header .accent {
  color: var(--accent);
}

/* cards & glass */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}

.card,
.staff-card,
.timeline-item,
.ctftime-card {
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.75rem;
}

.card h3 {
  margin-top: 0;
}

/* STAFF */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem;
}

.staff-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.staff-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0%, #4ade80, #064e3b); /* avatar verde */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.staff-role {
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0;
}

.staff-text {
  margin: 0;
  color: var(--muted);
}

/* TIMELINE */
.timeline {
  position: relative;
  margin-top: 1rem;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.6;
}

.timeline-item {
  position: relative;
  margin-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.timeline-dot {
  position: absolute;
  left: -1.85rem;
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.9);
}

.timeline-tag {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

.timeline-result {
  margin: 0.2rem 0 0;
  color: var(--accent);
}

/* CTFtime */
.ctftime-card {
  margin-top: 1rem;
}

.ctftime-header {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.ctftime-logo-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: radial-gradient(circle at 10% 0%, #4ade80, #020617); /* verde */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ctftime-logo {
  max-width: 100%;
  max-height: 100%;
}

.ctftime-name {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.ctftime-aliases,
.ctftime-country {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.ctftime-aliases span {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-right: 0.3rem;
  font-size: 0.8rem;
}

.ctftime-rating {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.ctftime-table-wrapper {
  overflow-x: auto;
}

.ctftime-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ctftime-table thead {
  background: rgba(10, 20, 56, 0.9);
}

.ctftime-table th,
.ctftime-table td {
  padding: 0.6rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.ctftime-table th {
  font-weight: 600;
}

.ctftime-table tbody tr {
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}

.ctftime-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.ctftime-table a {
  color: var(--accent);
  text-decoration: none;
}

.ctftime-table a:hover {
  text-decoration: underline;
}

/* FOOTER */
.footer {
  padding: 1.3rem 6vw 2rem;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-dot {
  opacity: 0.5;
}

/* Error */
.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.7rem;
}

.hidden {
  display: none;
}

/* Animations */
@keyframes float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(18px, -18px, 0) scale(1.15);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-orbit {
    max-width: 380px;
    margin-inline: auto;
  }

  .nav-links {
    display: none; /* keep it ultra clean on mobile */
  }
}
