/* BODY */

html{
    scroll-behavior:smooth
}


body {
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; */
    font-family: ui-sans-serif, system-ui, sans-serif;
    background: #000000;
    color: #c9d1d9;
    line-height: 1.7;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* fade-in duration */
}

body.loaded {
  opacity: 1;
}

main{
    padding:100px 48px 80px;
    max-width:900px;
    margin:0 auto
}

main li{
    margin-bottom:16px
}

section li{
    margin-bottom:16px
}

p {
    color: #8b949e !important;
}

.shadow-top {
    box-shadow: 0px 0px 12px rgba(142, 173, 230, 0.25);
    padding: 1rem 4rem 4rem 4rem;
    border-radius: 12px;
}

h1, h2, h3 {
    scroll-margin-top: 80px;
}

main h1 {
    font-size:56px;
    font-weight:800;
    letter-spacing:-1.5px;
    margin-bottom:8px;
    background:linear-gradient(135deg,var(--accent) 0%,#fff 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent
}

section h1 {
    font-size:56px;
    font-weight:800;
    letter-spacing:-1.5px;
    margin-bottom:8px;
    background:linear-gradient(135deg,var(--accent) 0%,#fff 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent
}

h2 {
    font-size:36px;
    font-weight:700;
    margin:80px 0 24px;
    letter-spacing:-.5px
}
h3 {
    font-size:24px;
    font-weight:600;
    margin:32px 0 12px
}


/* NAVBAR */

.header {
    background: #1616168c;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11)
} 

#top-nav {
    position: fixed;       /* always visible */
    top: 0;
    left: 0;
    right: 0;
}

.logo {
    width: 100%; /* takes full width of its container */
    height: auto; /* keeps aspect ratio */
    max-width: 150px; /* optional: limits maximum size */
    position: fixed right;
}


/* NABAR LINKS*/

.nav-menu {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* eg LearnHub*/ 
.nav-heading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nav-link {
    color: #c9d1d9;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    color: #58a6ff;
}
.nav-link.active {
    color: #58a6ff !important;
}

.text-desktop {
    text-align: center;
}

p.text-desktop {
    margin-top: 3rem;
}


/* BUTTONS */

/* Login Buttons*/

.btn-login {
    background: #58a6ff;
    color: #000000;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    background-color: #336399;
    border-color: #58a6ff;
    color:#000000
}

/* Google Button */
.btn-google {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #0d1117;
    border: 1px solid #ccc;
    border-radius: 6px;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-google:hover {
    background-color: rgb(173, 173, 173);
    border-color: #ffffff;
    color:#000000
}

.btn-google img {
  height: 20px;
  width: 20px;
  margin-right: 10px;
}

/* Filter Buttons*/

.btn-filter {
    color: #58a6ff;
    border: 1px solid #58a6ff;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter:hover {
    background-color: #58a6ff;
    border-color: #58a6ff;
    color:#000000
}

.btn-filter.active {
    background-color: #58a6ff;
    border-color: #58a6ff;
    color:#000000
}

.filter-wrapper {
    display: flex;          
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 0 20px 85px 20px;
}

.filter-wrapper form {
    width: auto;
}

.search {
    width: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 15px;
    border: 1px solid #f6f6f6;
    border-radius: 28px;
}

.search-input {
    background: transparent;
    outline: none;
    border: none;
    color: #f6f6f6;
    font-weight: 500;
    width: 100px;
    transition: width 0.25s ease;
}

.search-input:focus, 
.search-input.has-text,
input:-webkit-autofill {
    width: 280px; /* expanded width */
}


.search-icon {
    color: rgba(255, 255, 255, 0.7);
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none; /* remove default style */
    appearance: none;
    background: #58a6ff; /* change background color */
    width: 16px;      /* adjust size */
    height: 16px;
    mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><line x1="6" y1="6" x2="18" y2="18" stroke="white" stroke-width="2"/><line x1="18" y1="6" x2="6" y2="18" stroke="white" stroke-width="2"/></svg>') no-repeat center / contain;
    cursor: pointer;
}



/* CTA Buttons*/

/* Browse Courses & Unlock Full Access */
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Ko-fi Shop */
.cta-button {
    display: block;
    margin: 2rem auto 0;
    padding: 0.875rem 2rem;
    color: #58a6ff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #58a6ff;
    color: #0d1117;
    border: 1px solid #58a6ff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #336399;
    border-color: #58a6ff;
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: #58a6ff;
    border: 1px solid #30363d;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #161b22;
    border-color: #58a6ff;
}


/* MODALS */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 400px;

    display: flex;            /* ✅ enable flex inside modal */
    flex-direction: column;   /* stack children vertically */
    align-items: center;      /* center horizontally */
    gap: 16px;           
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    width: 100%;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #f0f6fc;
  
}

.close-btn {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #f0f6fc;
    background: #21262d;
}

form {
    width: 100%;
}

.form-group {
    margin-bottom: 16px;
    
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #c9d1d9;
    
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.btn-submit {
    width: 100%;
    background: #58a6ff;
    color: #0d1117;
    border: 1px solid #58a6ff;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-submit:hover {
    background: #336399;
}


/* USER ICON */



#user-circle {
  margin-left: 16px;
  width: 40px;           /* size of icon */
  height: 40px;
  border-radius: 50%;    /* makes it circular */
  overflow: hidden;      /* ensures image doesn’t overflow */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #21619c; /* fallback color */
  font-weight: bold;      /* for letter initials */
  color: rgb(255, 255, 255);
  font-size: 1.2rem;
  background-size: cover; /* makes the image cover container */
  background-position: center;
  background-repeat: no-repeat;
}


/* COURSES SECTION */

.courses-section {
    background: #000000;
    padding: 5% 6% 6% 6%;
}

.section-header {
    max-width: 1280px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: #8b949e;
}

/* Courses */

.courses-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.course-card {
    background: #1a1a1b8c;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s; 
    transform: 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;

}

.course-card:hover {
    border-color: #58a6ff;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.1);
    transform: translateY(-8px)
}

.course-card-free {
    background: #1a1a1b8c;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s; 
    transform: 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;

}

.course-card-free:hover {
    border-color: #58a6ff;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.1);
    transform: translateY(-8px)
}

.course-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.course-icon {
    width: 40px;
    height: 40px;
    background: #21262d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    color: #f0f6fc;
}

.course-description {
    color: #8b949e;
    line-height: 1.6;
    flex-grow: 1;
    font-size: 14px;
    margin-bottom: 28px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #8b949e;
}

.course-date {
    display: flex;
    justify-content: flex-start; /* date on the left, badge after */
    align-items: center;         
    gap: 0.5rem;                 
}

.course-price {
    font-size: 24px;
    font-weight: 600;
    color: #58a6ff;
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.beginner {
    background: rgba(35, 134, 54, 0.1);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.3);
}

.intermediate {
    background: rgba(212, 168, 43, 0.1);
    color: #d4a82b;
    border: 1px solid rgba(212, 168, 43, 0.3);
}

.advanced {
    background: rgba(218, 54, 51, 0.1);
    color: #da3633;
    border: 1px solid rgba(218, 54, 51, 0.3);
}


/* HERO SECTION */

.hero {
    text-align: center;
    padding: 8% 20% 70px 20%;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #ffffff 100%);
    background-image: linear-gradient(135deg, rgb(88, 166, 255) 0%, rgb(255, 255, 255) 100%);
    background-position-x: initial;
    background-position-y: initial;
    background-size: initial;
    background-repeat: initial;
    background-attachment: initial;
    background-origin: initial;
    background-clip: initial;
    background-color: initial;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero p {
    font-size: 20px;
    color: #8b949e;
    margin-bottom: 32px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}


/* 1-2-3 GUIDE */

.steps-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.steps-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

/* Connecting line */
.steps-wrapper::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 100px;
    right: 100px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    min-width: 180px;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(223, 219, 231, 0.3);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* White reflection */
.step-icon::after {
    content: "";
    position: absolute;
    top: 5%;
    left: 15%;
    width: 70%;
    height: 35%;
    background: rgba(255, 255, 255, 0.212);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.7;
    pointer-events: none;
}


.step-img {
    width: 32px;
    height: auto;
}

.step-item:hover .step-icon {
    transform: scale(1.05);
}

.step-number {
    position: absolute;
    top: -5px;
    right: 35%;
    background: #58a6ff;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.step-title {
    font-weight: 700;
    color: #c4c4c4;
    margin-bottom: 0.25rem;
    cursor: default;
}

.step-desc {
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.3;
    max-width: 180px;
    margin: 0 auto;
    cursor: default;
}


/* OUTLINE */

#outline {
    width: 325px;
    background-color: #000000;
    padding: 7rem 1.8rem 2rem 1.8rem; /* top padding accounts for navbar */
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    height: calc(100vh - 3rem); /* viewport height minus top padding/navbar */
    overflow-y: auto;

     /* Hide scrollbar for all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

#outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 325px;
    height: 6.25rem; /* height of navbar */
    background-color: #000000; /* same as sidebar background */
    z-index: 1; /* behind content */
}

#outline a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #8b949e;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}

#outline a[data-level="1"] {
    font-size: 0.85rem;
    font-weight: 700; /* bold but muted */
    color: #8b949e;
}

#outline a[data-level="2"] {
    font-size: 0.9rem;
    font-weight: 600; /* semi-bold */
    color: #c9d1d9;
    padding-left: 1.5rem;
}

#outline a:hover {
    background-color: #21262d;
    color: #58a6ff;
}

#outline a.active {
    background-color: #21262d;
    color: #58a6ff;
    font-weight: 600;
    border-left: 4px solid #58a6ff;
}

/* Indent h2 and h3 */
#outline a[data-level="2"] { padding-left: 1.5rem; }
#outline a[data-level="3"] { padding-left: 2.5rem; }


/* MARKDOWN */

textarea {    
    width: 100%;
    height: 150px;
    padding: 1rem;
    font-size: 1rem;
    font-family: monospace;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid #30363d;
    color: #c9d1d9;
    display: none;
}

.textarea-body {
    background-color: #1616168c;
    color: #c9d1d9
}

.markdown-body {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 2rem;
    margin-top: 70px;
    border-radius: 6px;
    position: relative; /* ← add this */
    background-color: transparent;
}

.markdown-body code {
    color: #c9d1d9;
    background-color: #21262d;
}

.main-container {
    height: 100vh;
    overflow: hidden;
    display: flex;
    padding: 2rem;
	flex: 1;
}

textarea table {
  border-radius: 10px; /* round corners */
}

/* Table header */
textarea table thead th {
  background-color: #0d1117; /* header background */
  color: #ffffff; /* header text color */
  padding: 10px;
  text-align: left;
}

/* Table body cells */
textarea table tbody td {
  background-color: #1616168c; /* row background */
  color: #cfcfcf; /* cell text color */
  padding: 8px;
}

/* Table borders */
textarea table, th, td {
  border: 1px solid #252525;
}


/* ABOUT SECTION */

.about-section {
    padding: 0% 28% 5% 28%;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.team-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    width: 350px;
    height: auto;
}

.team-card:hover {
    border-color: #58a6ff;
}

.avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
    background: #58a6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.team-name {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-role {
    color: #58a6ff;
    font-size: 0.9rem;
}

.row-about {
    margin-bottom: 150px;
    align-items: center;
}

.row-structure {
    margin-bottom: 100px; 
}


/* TERMS SECTION */

.terms-section {
    padding: 5% 20%;
}


.hidden {
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}




/* Initial state: invisible and slightly below */
.fade-in {
  opacity: 0;
  transform: translateY(40px); /* start 40px below */
  transition: opacity 1s ease, transform 1s ease;
}

/* When visible: fully opaque and in place */
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-up {
  transform: translateY(80px); /* start 100px below */
  transition: opacity 1.5s ease, transform 1.5s ease;
}

/* When visible: fully opaque and in place */
.scroll-up.visible {
  transform: translateY(0);
}





pre {
  overflow: hidden; /* clips content that goes outside */
}

/* Container for each code block */
.code-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: visible;
}

/* Optional: show only on hover */
.code-wrapper:hover .copy-btn {
  opacity: 1;
  transition: opacity 0.2s;
}

.copy-btn img {
  border-radius: 0;
}





/* FOOTER */
.footer {
    background: #000000;
    box-shadow: 0 0px 1px rgba(255, 255, 255, 0.5);
    padding: 48px 32px;
    text-align: center;
    color: #8b949e;
    font-size:14px;
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 54px;
    flex-wrap: wrap;
}

.footer-link {
    color: #c1d1d9;
    text-decoration: none;
    transition: color 0.2s;
    padding: 10px;
}

.footer-link:hover {
    color: #79c0ff;
}


/* Responsive */

@media (max-width: 1500px) {
    .about-section {
        padding: 0% 10% 5% 10%;
    }
}

@media (max-width: 768px) {

    #user-circle {
        margin: 10px;
        margin-bottom: 18px;
    }
    .nav-link:hover {
    background-color: transparent;
    }

    .hero {
        padding: 18% 6% 6% 6%;
    }   

    .hero h1 {
        font-size: 55px;
    }
    
    .hero p {
        font-size: 16px;
    }

    .terms-section {
        padding: 15% 6%;
    }

    .terms-section h1 {
        font-size: 40px;
    }

    .terms-section h2 {
        font-size: 28px;
        margin-top: 60px;
    }

    .about-section {
        padding: 0% 6% 6% 6%;
    }

    .courses-section {
        padding-top: 0;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        padding: 0 16px;
    }

    .markdown-body {
    padding: 0; /* or 0 if you want completely no padding */
    padding-bottom: 3rem;
    margin-top: 45px;
    }

    .main-container {
        padding: 99px 1.5rem 0 1.5rem ;
        
    }

    .main-container h1 {
        font-size: 28px;
        
    }

    .steps-wrapper::before {
    display: none;
    }

    .shadow-top {
        box-shadow: none;
        padding: 0;
    }

    .navbar-nav {
        margin-left: auto;
        margin-right: auto;
        margin-top: 1rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    main {
        padding: 0.5rem;
    }


    .text-desktop {
        text-align: left;
    }

    ul, p.text-desktop {
        margin-top: 2rem;
    }



    h2.text-desktop {
        margin: 0;
        text-align: center;
    }

    .row-about {
        margin-bottom: 50px;
    }

    .row-structure {
        margin-bottom: 20px; 
    }

    .footer-links {
        gap: 0.3rem;
    }
}

@media (max-width: 991px) {
    ul {
        margin-top: 2rem;
    }
}