/* ============================================================
   QuantWonny — Main Stylesheet
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Variables --- */
:root {
  --navy:     #0f172a;
  --blue:     #2563eb;
  --blue-dk:  #1d4ed8;
  --purple:   #7c3aed;
  --green:    #059669;
  --cyan:     #0ea5e9;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  --sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.09), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 36px rgba(0,0,0,.11), 0 4px 8px rgba(0,0,0,.06);

  --radius: 12px;
  --ease:   0.22s ease;
}

/* --- Base --- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.3; }
img { max-width: 100%; display: block; }
a  { text-decoration: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 42px; width: auto; object-fit: contain; mix-blend-mode: multiply; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  color: var(--gray-700);
  font-size: .9rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 8px;
  transition: background var(--ease), color var(--ease);
}

.nav-links a:hover {
  color: var(--blue);
  background: rgba(37, 99, 235, .07);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--ease);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 96px 24px 88px;
  text-align: center;
  background: var(--white);
  overflow: hidden;
}

/* Radial colour blooms */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 12% 65%, rgba(37, 99, 235, .055) 0%, transparent 100%),
    radial-gradient(ellipse 50% 40% at 88% 20%, rgba(14, 165, 233, .05)  0%, transparent 100%);
  pointer-events: none;
}

/* Subtle grid lines */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .065) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero-logo {
  height: 200px;
  width: auto;
  margin: 0 auto 36px;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 6px 20px rgba(37, 99, 235, .12));
  transition: filter .3s ease;
}

.hero-logo:hover {
  filter: drop-shadow(0 8px 28px rgba(37, 99, 235, .22));
}

.hero-tagline {
  font-size: 2.15rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 14px;
  letter-spacing: -.025em;
}

.hero-sub {
  font-size: 1.03rem;
  color: var(--gray-500);
  line-height: 1.78;
  max-width: 520px;
  margin: 0 auto 30px;
}

.hero-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 38px;
}

.pill {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 15px;
  border-radius: 100px;
}

.pill-blue   { background: rgba(37,  99, 235, .1);  color: #1d4ed8; }
.pill-purple { background: rgba(124, 58, 237, .1); color: #6d28d9; }
.pill-green  { background: rgba(5,  150, 105, .1);  color: #047857; }

.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 13px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .93rem;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .35);
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn-primary:hover {
  background: var(--blue-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .42);
}

/* ============================================================
   Posts Section
   ============================================================ */
.posts {
  padding: 84px 0;
  background: var(--gray-50);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: 1.85rem;
  color: var(--gray-900);
}

.filters {
  display: flex;
  gap: 4px;
  background: var(--white);
  padding: 4px;
  border-radius: 100px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.filter {
  background: none;
  border: none;
  padding: 7px 18px;
  border-radius: 100px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  font-family: var(--sans);
  transition: all var(--ease);
}

.filter:hover { color: var(--gray-900); }
.filter.is-active { background: var(--navy); color: #fff; }

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

/* ---- Post Card ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-bar { height: 3px; }
.bar-algotrading { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.bar-research    { background: linear-gradient(90deg, #7c3aed, #c4b5fd); }
.bar-coding      { background: linear-gradient(90deg, #059669, #6ee7b7); }

.card-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 13px;
  width: fit-content;
}

.badge-algotrading { background: rgba(37,  99, 235, .1);  color: #1d4ed8; }
.badge-research    { background: rgba(124, 58, 237, .1); color: #6d28d9; }
.badge-coding      { background: rgba(5,  150, 105, .1);  color: #047857; }

.card-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 10px;
  line-height: 1.45;
  transition: color var(--ease);
}

.card:hover .card-title { color: var(--blue); }

.card-excerpt {
  font-size: .86rem;
  color: var(--gray-500);
  line-height: 1.68;
  flex: 1;
  margin-bottom: 18px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

.card-date,
.card-time { font-size: .76rem; color: var(--gray-500); }

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 13px;
  transition: gap var(--ease);
}

.card-cta:hover { gap: 8px; }

.empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: .95rem;
}

/* ============================================================
   About Section
   ============================================================ */
.about {
  padding: 92px 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 72px;
  align-items: center;
}

.about-text h2 {
  font-size: 1.95rem;
  color: var(--gray-900);
  margin-bottom: 18px;
}

.about-text p {
  color: var(--gray-500);
  font-size: .93rem;
  line-height: 1.78;
  margin-bottom: 14px;
}

.topic-list {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.topic {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.topic-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-algo     { background: rgba(37,  99, 235, .09); }
.icon-research { background: rgba(124, 58, 237, .09); }
.icon-coding   { background: rgba(5,  150, 105, .09); }

.topic-text strong {
  display: block;
  font-size: .88rem;
  color: var(--gray-900);
  font-weight: 600;
  margin-bottom: 2px;
}

.topic-text span {
  font-size: .81rem;
  color: var(--gray-500);
}

.chart-deco {
  width: 100%;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0);     }
  50%       { transform: translateY(-10px); }
}

/* ============================================================
   Newsletter
   ============================================================ */
.newsletter {
  padding: 84px 0;
  background: var(--gray-50);
}

.nl-card {
  background: var(--navy);
  border-radius: 20px;
  padding: 60px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Subtle glow behind the card */
.nl-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(37, 99, 235, .25) 0%, transparent 70%);
  pointer-events: none;
}

.nl-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

.nl-text h2 {
  font-size: 1.9rem;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}

.nl-text p {
  color: rgba(255, 255, 255, .6);
  font-size: .93rem;
  line-height: 1.75;
  margin-bottom: 22px;
}

.nl-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nl-perks li {
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}

.nl-perks li::first-letter { color: var(--cyan); }

/* Form side */
.nl-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 10px;
  letter-spacing: .01em;
}

.nl-input-row {
  display: flex;
  gap: 10px;
}

.nl-input {
  flex: 1;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: .9rem;
  font-family: var(--sans);
  outline: none;
  transition: border-color var(--ease), background var(--ease);
}

.nl-input::placeholder { color: rgba(255, 255, 255, .3); }

.nl-input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, .12);
}

.nl-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), transform var(--ease);
}

.nl-btn:hover {
  background: var(--blue-dk);
  transform: translateY(-1px);
}

.nl-privacy {
  margin-top: 10px;
  font-size: .76rem;
  color: rgba(255, 255, 255, .3);
}

/* Success state */
.nl-success {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, .07);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
}

.nl-success-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(5, 150, 105, .25);
  color: #6ee7b7;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nl-success p {
  color: rgba(255, 255, 255, .75);
  font-size: .9rem;
  line-height: 1.6;
  margin: 0;
}

.nl-success strong { color: #fff; }

/* Responsive */
@media (max-width: 860px) {
  .nl-card {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 32px;
  }
}

@media (max-width: 480px) {
  .nl-input-row { flex-direction: column; }
  .nl-btn { width: 100%; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .6);
  padding: 52px 0 30px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 26px;
}

.footer-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 7px;
  letter-spacing: -.01em;
}

.footer-tagline { font-size: .8rem; opacity: .5; }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-nav a {
  color: rgba(255, 255, 255, .55);
  font-size: .86rem;
  font-weight: 500;
  transition: color var(--ease);
}

.footer-nav a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, .45);
  font-size: .82rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.social-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.social-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .06);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p { font-size: .76rem; opacity: .4; }
.footer-disc { font-style: italic; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { display: none; }
}

@media (max-width: 768px) {
  .hero { padding: 72px 20px 64px; }
  .hero-tagline { font-size: 1.65rem; }
  .hero-logo { height: 150px; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .post-grid { grid-template-columns: 1fr; }

  .nav-links {
    display: none;
    position: fixed;
    top: 66px;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 20px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border-top: 1px solid var(--gray-100);
    list-style: none;
    gap: 4px;
  }

  .nav-links.open { display: flex; }
  .hamburger      { display: flex; }

  .footer-top,
  .footer-bottom { flex-direction: column; gap: 16px; }
  .footer-right  { align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-tagline { font-size: 1.4rem; }
  .filters { flex-wrap: wrap; border-radius: 12px; }
}
