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

:root {
  --primary: #4b45d8;
  --primary-dark: #3730a3;
  --secondary: #6d63f5;
  --accent: #8b5cf6;
  --ink: #1e2340;
  --muted: #69708a;
  --line: #e8eaf2;
  --surface: #ffffff;
  --soft: #f6f7fb;
  --soft-blue: #f2f4ff;
  --dark: #171a31;
  --shadow: 0 18px 50px rgba(38, 43, 92, .10);
  --radius: 20px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.modern-header { position: fixed; inset: 0 0 auto; z-index: 1000; height: 82px; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(232,234,242,.9); backdrop-filter: blur(16px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.modern-logo { display: inline-flex; align-items: center; gap: 12px; font-family: Poppins, sans-serif; font-weight: 800; font-size: 20px; }
.logo-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 10px 25px rgba(75,69,216,.25); }
.logo-text span { color: var(--primary); }
.modern-nav { display: flex; align-items: center; gap: 28px; }
.modern-nav a { position: relative; color: #646b83; font-size: 14px; font-weight: 600; transition: .2s ease; }
.modern-nav a:not(.nav-cta)::after { content: ''; position: absolute; left: 0; bottom: -9px; width: 0; height: 2px; background: var(--primary); transition: width .2s ease; }
.modern-nav a:hover { color: var(--primary); }
.modern-nav a:hover::after { width: 100%; }
.nav-cta { padding: 12px 19px; border-radius: 12px; color: #fff !important; background: var(--primary); box-shadow: 0 10px 24px rgba(75,69,216,.20); }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.modern-toggle { display: none; border: 0; background: transparent; font-size: 28px; color: var(--ink); cursor: pointer; }

.language-switcher { position: relative; flex: 0 0 auto; }
.language-current { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.language-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 130px; padding: 7px; display: none; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.language-switcher.open .language-menu { display: grid; }
.language-menu button { border: 0; padding: 9px 10px; border-radius: 8px; background: transparent; text-align: left; color: var(--muted); cursor: pointer; font: 600 12px Inter, sans-serif; }
.language-menu button:hover { background: var(--soft-blue); color: var(--primary); }

.modern-hero { position: relative; overflow: hidden; padding: 155px 0 105px; background: linear-gradient(180deg, #fbfbfe 0%, #fff 100%); }
.modern-hero::before { content: ''; position: absolute; width: 520px; height: 520px; right: -230px; top: 50px; border-radius: 50%; background: rgba(109,99,245,.08); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 70px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.eyebrow::before { content: ''; width: 30px; height: 2px; background: var(--primary); }
.hero-copy h1 { max-width: 680px; margin: 0 0 22px; font-family: Poppins, sans-serif; font-size: clamp(42px, 5.2vw, 68px); line-height: 1.08; letter-spacing: -.045em; }
.hero-copy h1 span { color: var(--primary); }
.hero-copy p { max-width: 630px; margin: 0 0 30px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 21px; border-radius: 12px; font-size: 14px; font-weight: 700; transition: .2s ease; }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 12px 25px rgba(75,69,216,.22); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: #cfd2e3; transform: translateY(-2px); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 22px; }
.proof-item { display: flex; flex-direction: column; }
.proof-item strong { font-family: Poppins, sans-serif; font-size: 19px; }
.proof-item small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.hero-visual { position: relative; min-height: 470px; }
.hero-photo-frame { position: absolute; inset: 25px 0 0 45px; border-radius: 30px; overflow: hidden; background: #eef0f8; box-shadow: var(--shadow); }
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-code { position: absolute; left: 0; bottom: 30px; width: min(340px, 76%); padding: 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; color: #dfe3ff; background: rgba(23,26,49,.95); box-shadow: 0 25px 55px rgba(16,20,48,.25); font: 12px/1.8 Consolas, monospace; }
.hero-code .dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #8b5cf6; }
.hero-code strong { color: #fff; }

.section { padding: 100px 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 700px; margin: 0 auto 52px; text-align: center; }
.section-kicker { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.section-head h2 { margin: 10px 0 14px; font-family: Poppins, sans-serif; font-size: clamp(32px, 4vw, 44px); line-height: 1.15; letter-spacing: -.035em; }
.section-head p { margin: 0; color: var(--muted); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card { min-height: 230px; padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 5px 20px rgba(32,38,80,.03); transition: .25s ease; }
.service-card:hover { transform: translateY(-7px); border-color: #d7d5ff; box-shadow: var(--shadow); }
.service-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 15px; color: var(--primary); background: var(--soft-blue); font-size: 21px; font-weight: 800; }
.service-card h3 { margin: 0 0 9px; font-family: Poppins, sans-serif; font-size: 18px; }
.service-card p { margin: 0; color: var(--muted); font-size: 13px; }
.course-section { position: relative; overflow: hidden; color: #fff; background: var(--dark); }
.course-section::before { content: ''; position: absolute; width: 650px; height: 650px; right: -250px; top: -320px; border-radius: 50%; background: rgba(109,99,245,.22); }
.course-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course-card { padding: 28px; border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius); background: rgba(255,255,255,.055); transition: .25s ease; }
.course-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.085); }
.course-number { color: #aaa7ff; font: 700 12px/1 Poppins, sans-serif; letter-spacing: .12em; }
.course-card h3 { margin: 14px 0 9px; font-family: Poppins, sans-serif; font-size: 20px; }
.course-card p { margin: 0 0 20px; color: #b8bdd2; font-size: 13px; }
.course-link { color: #fff; font-size: 13px; font-weight: 700; }
.course-link:hover { color: #aaa7ff; }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: center; }
.about-photo { position: relative; max-width: 470px; margin: 0 auto; padding: 14px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.about-photo::after { content: ''; position: absolute; inset: 28px -18px -18px 28px; z-index: -1; border-radius: 25px; background: linear-gradient(135deg, rgba(75,69,216,.18), rgba(139,92,246,.05)); }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; }
.about-copy h2 { margin: 8px 0 17px; font-family: Poppins, sans-serif; font-size: clamp(31px, 4vw, 45px); line-height: 1.15; }
.about-copy p { margin: 0 0 16px; color: var(--muted); }
.tech-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.tech-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #555d75; font-size: 12px; font-weight: 600; }
.contact-band { padding: 80px 0; background: linear-gradient(135deg, #4b45d8, #685ff0); color: #fff; }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.contact-card h2 { margin: 0 0 8px; font-family: Poppins, sans-serif; font-size: clamp(28px, 4vw, 42px); }
.contact-card p { margin: 0; color: rgba(255,255,255,.78); }
.contact-card .btn { background: #fff; color: var(--primary); }
.modern-footer { padding: 32px 0; background: #111429; color: #aeb4ca; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-inner p { margin: 0; font-size: 12px; }
.footer-links { display: flex; gap: 18px; font-size: 12px; }
.footer-links a:hover { color: #fff; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Contact page */
.contact-page { padding-top: 82px; }
.contact-hero { padding: 90px 0 110px; background: radial-gradient(circle at 85% 10%, rgba(109,99,245,.12), transparent 35%), var(--soft); }
.contact-hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start; }
.contact-intro h1 { max-width: 650px; margin: 0 0 20px; font: 800 clamp(38px, 5vw, 58px)/1.08 Poppins, sans-serif; letter-spacing: -.04em; }
.contact-intro p { max-width: 620px; color: var(--muted); font-size: 16px; }
.contact-info-list { display: grid; gap: 12px; margin-top: 32px; }
.contact-info-list a { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: .2s ease; }
.contact-info-list a:hover { transform: translateX(4px); border-color: #d7d5ff; box-shadow: var(--shadow); }
.contact-info-list a > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--soft-blue); color: var(--primary); font-size: 12px; font-weight: 800; }
.contact-info-list strong, .contact-info-list small { display: block; }
.contact-info-list strong { font-size: 13px; }
.contact-info-list small { color: var(--muted); font-size: 12px; }
.contact-form-card { padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.form-head h2 { margin: 7px 0 5px; font: 800 30px/1.2 Poppins, sans-serif; }
.form-head p { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.contact-form-card form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form-card label { display: grid; gap: 7px; color: #525a74; font-size: 12px; font-weight: 700; }
.contact-form-card input:not([type="checkbox"]), .contact-form-card textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; outline: none; background: #fbfbfe; color: var(--ink); font: 500 14px Inter, sans-serif; transition: .2s ease; }
.contact-form-card textarea { resize: vertical; min-height: 150px; }
.contact-form-card input:focus, .contact-form-card textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(75,69,216,.08); background: #fff; }
.consent { display: flex !important; grid-template-columns: auto 1fr; align-items: start; gap: 9px !important; font-weight: 500 !important; }
.consent input { margin-top: 4px; }
.form-note { margin: 16px 0 0; color: #8a90a3; font-size: 11px; }

/* Resource hub */
.resource-hero { padding: 150px 0 90px; background: linear-gradient(180deg, #fbfbfe, #fff); }
.resource-hero h1 { max-width: 760px; margin: 0 0 15px; font: 800 clamp(38px, 5vw, 58px)/1.08 Poppins, sans-serif; letter-spacing: -.04em; }
.resource-hero p { max-width: 700px; margin: 0; color: var(--muted); font-size: 16px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.resource-card { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 5px 20px rgba(32,38,80,.03); transition: .25s ease; }
.resource-card:hover { transform: translateY(-6px); border-color: #d7d5ff; box-shadow: var(--shadow); }
.resource-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 16px; background: var(--soft-blue); color: var(--primary); font: 800 13px/1 Inter, sans-serif; }
.resource-tag { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.resource-card h2 { margin: 8px 0 8px; font: 700 20px/1.25 Poppins, sans-serif; }
.resource-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.resource-card a { display: inline-block; margin: 4px 14px 0 0; color: var(--primary); font-size: 12px; font-weight: 800; }
.resource-card a:hover { color: var(--primary-dark); }

/* Visual header for every lesson page. Uses an existing optimized local image, so course pages do not depend on an external image host. */
.lesson-header-card { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 55%, rgba(255,255,255,.45) 100%), url('../assets/images/banner-right-image.png'); background-position: center, right center; background-size: cover, 42% auto; background-repeat: no-repeat; }

@media (max-width: 1050px) { .services-grid { grid-template-columns: repeat(2, 1fr); } .course-grid { grid-template-columns: repeat(2, 1fr); } .hero-grid { gap: 45px; } .about-grid { gap: 50px; } .resource-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .contact-hero-grid { grid-template-columns: 1fr; } .contact-intro h1 { max-width: 760px; } }
@media (max-width: 820px) {
  .modern-header { height: 72px; }
  .header-inner { position: relative; }
  .modern-nav { position: absolute; top: 72px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
  .modern-nav.open { display: flex; }
  .modern-nav a { padding: 12px 14px; }
  .modern-nav a::after { display: none; }
  .modern-toggle { display: block; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .modern-hero { padding-top: 120px; }
  .hero-visual { min-height: 400px; max-width: 620px; width: 100%; margin: 0 auto; }
  .about-copy { order: -1; }
  .language-switcher { margin-left: auto; }
  .contact-page { padding-top: 72px; }
  .contact-hero { padding-top: 70px; }
}
@media (max-width: 620px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .section { padding: 75px 0; }
  .hero-copy h1 { font-size: 43px; }
  .hero-copy p { font-size: 15px; }
  .hero-photo-frame { inset: 15px 0 0 22px; }
  .hero-code { bottom: 15px; width: 82%; }
  .services-grid, .course-grid, .resource-grid { grid-template-columns: 1fr; }
  .service-card { min-height: auto; }
  .contact-card, .footer-inner { flex-direction: column; align-items: flex-start; }
  .about-photo { max-width: 390px; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form-card { padding: 24px; }
  .resource-hero { padding: 120px 0 70px; }
  .resource-hero h1 { font-size: 42px; }
}
