:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --text: #f9fafb;
  --muted: #9ca3af;
  --card: #111827;
  --border: #1f2933;
  --danger: #ef4444;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.7);
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
  color: var(--text);
  min-height: 100vh;
}

/* Layout */

.header {
  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, 6, 23, 0.96), rgba(2, 6, 23, 0.7));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at top left, #4f46e5 0, #020617 55%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #22d3ee);
  border-radius: 999px;
  transition: width var(--transition-fast);
}

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

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

/* Buttons */

.btn {
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #22d3ee);
  color: #0b1020;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Hero */

.hero {
  padding: 5rem 6vw 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin-bottom: 1rem;
}

.hero-content p {
  max-width: 32rem;
  color: var(--muted);
  margin-bottom: 1.8rem;
}

/* Courses */

.courses-section {
  padding: 2rem 6vw 3.5rem;
}

.courses-section h2,
.info-section h2,
.contact-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.course-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.course-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Info section */

.info-section {
  padding: 2rem 6vw 3.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.info-grid div {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Contact */

.contact-section {
  padding: 2rem 6vw 4rem;
}

.contact-form {
  max-width: 480px;
  background: rgba(15, 23, 42, 0.95);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
}

input,
textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

input:focus,
textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

/* Modal */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  z-index: 40;
}

.modal-content {
  background: radial-gradient(circle at top, #111827 0, #020617 70%);
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.4);
  position: relative;
}

.close {
  position: absolute;
  right: 0.9rem;
  top: 0.7rem;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}

.close:hover {
  color: var(--text);
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

/* Footer */

.footer {
  padding: 1.5rem 6vw 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 3.5rem;
  }

  .nav {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .header {
    padding-inline: 4vw;
  }

  .hero,
  .courses-section,
  .info-section,
  .contact-section,
  .footer {
    padding-inline: 4vw;
  }

  .nav a {
    display: none;
  }
}

.profile-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #4f46e5;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid white;
}

.profile-menu {
  position: absolute;
  top: 60px;
  right: 6vw;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0.5rem 0;
  width: 160px;
  display: flex;
  flex-direction: column;
}

.profile-menu a,
.profile-menu button {
  padding: 0.6rem 1rem;
  text-align: left;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.profile-menu a:hover,
.profile-menu button:hover {
  background: rgba(255,255,255,0.1);
}

.hidden {
  display: none !important;
}

.account-container {
  padding: 3rem 6vw;
}

.account-card {
  max-width: 420px;
  background: rgba(15,23,42,0.9);
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pfp-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  display: none;
}
