/* ============================================================
   TECHLEARN — GLOBAL STYLESHEET
   ============================================================ */


:root {
    --brand:        #0a84ff;
    --brand-dark:   #0060c7;
    --brand-light:  #e8f3ff;
    --accent:       #ff6b35;
    --accent-light: #fff3ee;

    --bg:           #ffffff;
    --bg-alt:       #f5f7fa;
    --bg-code:      #0d1117;

    --text-primary:   #0f1117;
    --text-secondary: #5a6374;
    --text-muted:     #8a93a2;

    --border:       #e2e6ec;
    --border-focus: #0a84ff;

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
    --shadow:    0 4px 20px rgba(0,0,0,0.09);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.13);

    --font-display: Arial, sans-serif;
    --font-body:    Arial, sans-serif;
    --font-code:   monospace;

    --header-h: 64px;
    --container: 1200px;
    --sidebar-w: 240px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { font-family: var(--font-body); color: var(--text-primary); background: var(--bg); line-height: 1.65; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-family: var(--font-code); font-size: 0.88em; }

/* ---- Container ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.header-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; gap: 32px;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-icon {
    font-family: var(--font-code); font-size: 1.1rem; font-weight: 700;
    background: var(--brand); color: #fff;
    padding: 4px 8px; border-radius: var(--radius-sm);
}
.brand-text { font-family: var(--font-display); font-size: 1.1rem; font-weight: 300; color: var(--text-primary); }

/* Main nav */
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
    font-size: 0.9rem; font-weight: 300; color: var(--text-secondary);
    padding: 6px 12px; border-radius: var(--radius-sm);
    transition: all 0.15s; text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--brand); background: var(--brand-light); text-decoration: none; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
    display: none; position: absolute; top: calc(100% + 8px); left: 0;
    background: white; border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 16px; gap: 24px;
    display: none; flex-direction: row; min-width: 340px;
}
.nav-dropdown:hover .dropdown-menu { display: flex; }
.dropdown-col { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dropdown-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 4px; }
.dropdown-item { font-size: 0.88rem; color: var(--text-secondary); padding: 5px 8px; border-radius: 6px; }
.dropdown-item:hover, .dropdown-item.active { background: var(--brand-light); color: var(--brand); text-decoration: none; }
.chevron { font-size: 0.7rem; }
.has-dropdown { display: flex; align-items: center; gap: 4px; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }

/* Buttons */
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--brand); color: white; font-weight: 600; font-size: 0.88rem;
    padding: 8px 16px; border-radius: var(--radius-sm); border: none; cursor: pointer;
    transition: all 0.15s; text-decoration: none;
}
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,132,255,0.35); }
.btn-primary.btn-lg { padding: 12px 24px; font-size: 0.95rem; border-radius: var(--radius); }
.btn-primary.btn-full { width: 100%; justify-content: center; padding: 14px; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; color: var(--text-secondary); font-weight: 600; font-size: 0.88rem;
    padding: 8px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); cursor: pointer;
    transition: all 0.15s; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-ghost.btn-lg { padding: 12px 24px; font-size: 0.95rem; border-radius: var(--radius); }

.btn-search {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    padding: 8px; border-radius: var(--radius-sm); display: flex; align-items: center;
    transition: color 0.15s; width: 36px; height: 36px; justify-content: center;
}
.btn-search:hover { color: var(--brand); background: var(--bg-alt); }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search bar */
.search-bar {
    background: white; border-top: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.search-bar.open { max-height: 72px; }
.search-inner {
    max-width: var(--container); margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; gap: 12px;
}
.search-inner svg { color: var(--text-muted); flex-shrink: 0; }
.search-inner input {
    flex: 1; border: none; outline: none; font-family: var(--font-body); font-size: 1rem;
    color: var(--text-primary); background: transparent;
}
.search-inner input::placeholder { color: var(--text-muted); }
.search-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; }
.search-close:hover { color: var(--text-primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #0d1117; color: #a8b3c4; margin-top: auto; }

.footer-top {
    max-width: var(--container); margin: 0 auto; padding: 56px 24px 40px;
    display: grid; grid-template-columns: 280px 1fr; gap: 48px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand-link .brand-icon { background: var(--brand); }
.footer-brand-link .brand-text { color: white; }
.footer-tagline { font-size: 0.88rem; line-height: 1.6; }
.social-links { display: flex; gap: 8px; margin-top: 4px; }
.social-link {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center; color: #a8b3c4;
    transition: all 0.15s;
}
.social-link:hover { background: var(--brand); color: white; transform: translateY(-2px); }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 { color: white; font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 0.88rem; color: #a8b3c4; transition: color 0.15s; }
.footer-col a:hover { color: white; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    max-width: var(--container); margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.82rem;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: #a8b3c4; transition: color 0.15s; }
.footer-bottom-links a:hover { color: white; text-decoration: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: calc(100vh - var(--header-h));
    max-width: var(--container); margin: 0 auto; padding: 80px 24px;
    display: grid; grid-template-columns: 1fr 480px; gap: 48px; align-items: center;
    position: relative;
}
.hero-bg-grid {
    position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 28px 28px; opacity: 0.5;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}
.hero-content { display: flex; flex-direction: column; gap: 20px; }
.hero-badge {
    display: inline-flex; align-items: center;
    background: var(--brand-light); color: var(--brand); font-size: 0.82rem; font-weight: 600;
    padding: 6px 12px; border-radius: 99px; width: fit-content;
    border: 1px solid #bfdbfe;
}
.hero-title {
    font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.5rem); font-weight: 800;
    line-height: 1.12; color: var(--text-primary);
}
.hero-title-accent { color: var(--brand); }
.hero-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; align-items: center; gap: 24px; padding-top: 8px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Code card */
.code-card {
    background: var(--bg-code); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.06);
    animation: floatCard 4s ease-in-out infinite;
}
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.code-card-header {
    background: #161b22; padding: 10px 16px;
    display: flex; align-items: center; gap: 6px;
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.code-filename { font-family: var(--font-code); font-size: 0.75rem; color: #8b949e; margin-left: 6px; }
.code-preview {
    padding: 20px 20px 8px; font-family: var(--font-code); font-size: 0.82rem;
    line-height: 1.75; overflow-x: auto;
}
.code-preview code, .tut-code code { display: block; }
.code-card-output { padding: 12px 16px; background: #1a1f29; border-top: 1px solid rgba(255,255,255,0.06); }
.output-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #6e7681; margin-bottom: 6px; }
.output-preview { background: white; border-radius: var(--radius-sm); padding: 10px 12px; }

/* Code syntax colors */
.ct { color: #79c0ff; }   /* tag */
.ca { color: #d2a8ff; }   /* attribute */
.cv { color: #a5d6ff; }   /* value */
.cx { color: #e6edf3; }   /* content */

/* ============================================================
   SECTION SHARED STYLES
   ============================================================ */
.section-header { text-align: center; margin-bottom: 40px; }
.section-badge {
    display: inline-block; background: var(--brand-light); color: var(--brand);
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    padding: 5px 12px; border-radius: 99px; margin-bottom: 12px;
}
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 800; color: var(--text-primary); margin-bottom: 10px; }
.section-subtitle { font-size: 1rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

/* ============================================================
   TUTORIALS SECTION
   ============================================================ */
.tutorials-section { padding: 80px 0; background: var(--bg-alt); }
.tutorials-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.tutorial-card {
    background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; display: flex; align-items: flex-start; gap: 16px;
    text-decoration: none; color: inherit; transition: all 0.2s;
    position: relative; overflow: hidden;
}
.tutorial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; text-decoration: none; color: inherit; }
.tc-icon { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tc-icon svg { width: 24px; height: 24px; }
.tc-body { flex: 1; }
.tc-body h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.tc-body p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.tc-tag { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg-alt); color: var(--text-muted); }
.tc-arrow { font-size: 1.2rem; color: var(--text-muted); align-self: center; transition: transform 0.15s; }
.tutorial-card:hover .tc-arrow { transform: translateX(4px); color: var(--brand); }

.tutorial-card--html .tc-icon { background: #fff3ee; color: #e44d26; }
.tutorial-card--html:hover { border-color: #e44d26; }
.tutorial-card--css .tc-icon { background: #eef3ff; color: #264de4; }
.tutorial-card--css:hover { border-color: #264de4; }
.tutorial-card--js .tc-icon { background: #fffde7; color: #f7df1e; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.3)); }
.tutorial-card--js:hover { border-color: #f7df1e; }
.tutorial-card--php .tc-icon { background: #eef0ff; color: #777bb3; }
.tutorial-card--php:hover { border-color: #777bb3; }
.tutorial-card--laravel .tc-icon { background: #fff0ee; color: #ff2d20; }
.tutorial-card--laravel:hover { border-color: #ff2d20; }
.tutorial-card--mysql .tc-icon { background: #f0f9ff; color: #00758f; }
.tutorial-card--mysql:hover { border-color: #00758f; }

/* ============================================================
   FEATURED SECTION
   ============================================================ */
.featured-section { padding: 80px 0; }
.featured-card { background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 40px; overflow: hidden; position: relative; }
.featured-label { font-size: 0.8rem; font-weight: 700; color: var(--brand); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; }
.featured-body { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.featured-text h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.featured-text p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }
.featured-badge { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.featured-points { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.featured-points li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.featured-points li::before { content: '✓'; color: var(--brand); font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.featured-code { background: var(--bg-code); border-radius: var(--radius-lg); overflow: hidden; }
.featured-code .code-card-header { background: #161b22; padding: 10px 16px; display: flex; align-items: center; gap: 6px; }
.featured-code pre { padding: 20px; font-family: var(--font-code); font-size: 0.82rem; line-height: 1.8; overflow-x: auto; }

/* ============================================================
   CODING CHALLENGE SECTION
   ============================================================ */
.challenge-section { padding: 60px 0; background: var(--bg-alt); }
.challenge-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px 48px;
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    transition: all 0.2s;
}
.challenge-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.challenge-text { max-width: 560px; }
.challenge-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--brand); background: var(--brand-light); padding: 6px 14px; border-radius: 99px;
    margin-bottom: 16px;
}
.challenge-text h2 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; margin-bottom: 12px; }
.challenge-text p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; margin-bottom: 24px; max-width: 480px; }
.challenge-visual {
    flex-shrink: 0; width: 140px; height: 140px; border-radius: 50%;
    background: var(--brand-light); border: 1px solid #bfdbfe;
    display: flex; align-items: center; justify-content: center;
}
.challenge-emoji { font-size: 3.5rem; }

@media (max-width: 768px) {
    .challenge-card { flex-direction: column-reverse; text-align: center; padding: 32px 24px; }
    .challenge-text { max-width: 100%; }
    .challenge-text p { max-width: 100%; }
    .challenge-visual { width: 100px; height: 100px; }
    .challenge-emoji { font-size: 2.5rem; }
}

/* ============================================================
   WHY SECTION
   ============================================================ */
.why-section { padding: 80px 0; background: var(--bg-alt); }
.why-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.why-card { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; transition: all 0.2s; }
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.why-icon { font-size: 1.8rem; margin-bottom: 12px; }
.why-card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.why-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   TUTORIAL LAYOUT
   ============================================================ */
.main-content { min-height: calc(100vh - var(--header-h)); }
.tutorial-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr 240px;
    gap: 0;
    max-width: 1300px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-h));
}

/* Sidebar */
.tutorial-sidebar {
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky; top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--bg-alt);
}
.sidebar-header { padding: 0 16px 16px; }
.sidebar-topic-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--brand); background: var(--brand-light); padding: 4px 10px; border-radius: 99px;
}
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-title { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 0 16px 6px; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav a {
    display: block; font-size: 0.875rem; color: var(--text-secondary);
    padding: 6px 16px; transition: all 0.1s;
}
.sidebar-nav a:hover { color: var(--brand); background: rgba(10,132,255,0.05); text-decoration: none; }
.sidebar-nav a.active { color: var(--brand); background: var(--brand-light); font-weight: 600; border-right: 3px solid var(--brand); }

/* Tutorial article */
.tutorial-content { padding: 40px 48px; max-width: 760px; }
.tut-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
.tut-breadcrumb a { color: var(--text-muted); }
.tut-breadcrumb a:hover { color: var(--brand); }
.tut-breadcrumb span { color: var(--border); }

.tut-title { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); }
.tut-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.tut-difficulty { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.tut-difficulty--beginner { background: #dcfce7; color: #15803d; }
.tut-difficulty--intermediate { background: #fef3c7; color: #92400e; }
.tut-difficulty--advanced { background: #fce7f3; color: #9d174d; }
.tut-read-time, .tut-updated { font-size: 0.8rem; color: var(--text-muted); }

.tutorial-content h2 {
    font-family: var(--font-display); font-size: 1.45rem; font-weight: 700;
    margin: 36px 0 14px; padding-top: 8px; border-top: 1px solid var(--border);
}
.tutorial-content h2:first-of-type { border-top: none; margin-top: 0; }
.tutorial-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.75; }
.tutorial-content ul { padding-left: 20px; margin-bottom: 16px; }
.tutorial-content li { color: var(--text-secondary); margin-bottom: 6px; line-height: 1.65; }

/* Definition box */
.tut-definition-box {
    background: var(--brand-light); border: 1.5px solid #bfdbfe; border-radius: var(--radius-lg);
    padding: 20px 24px; margin-bottom: 28px;
}
.tut-definition-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tut-definition-box li { font-size: 0.9rem; color: var(--text-primary); display: flex; align-items: flex-start; gap: 8px; }
.tut-definition-box li::before { content: '✦'; color: var(--brand); flex-shrink: 0; font-size: 0.7rem; margin-top: 4px; }

/* Example block */
.tut-example-block { background: #0d1117; border-radius: var(--radius-lg); overflow: hidden; margin: 20px 0; border: 1px solid rgba(255,255,255,0.06); }
.tut-example-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #161b22; }
.tut-example-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6e7681; }
.tut-copy-btn {
    font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 6px;
    background: rgba(255,255,255,0.08); color: #a8b3c4; border: none; cursor: pointer; transition: all 0.15s;
}
.tut-copy-btn:hover { background: var(--brand); color: white; }
.tut-code { padding: 20px; font-family: var(--font-code); font-size: 0.84rem; line-height: 1.8; overflow-x: auto; }

/* Output */
.tut-output { background: white; border-top: 1px solid rgba(255,255,255,0.06); padding: 12px 16px; }
.tut-output-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #aaa; margin-bottom: 8px; }
.tut-output-body { font-family: var(--font-body); }

/* Explanation grid */
.tut-explanation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 28px; }
.tut-explain-item { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.tut-tag-inline {
    display: inline-block; font-family: var(--font-code); font-size: 0.88rem;
    background: var(--bg-code); color: #79c0ff; padding: 3px 8px; border-radius: 4px; margin-bottom: 8px;
}
.tut-explain-item p { font-size: 0.95rem; color: var(--text-secondary); margin: 0; line-height: 1.55; }
.tut-explain-item code { font-size: 0.9em; background: var(--bg-alt); padding: 1px 4px; border-radius: 3px; }

/* Syntax diagram */
.tut-syntax-diagram { background: var(--bg-alt); border: 1.5px dashed var(--border); border-radius: var(--radius-lg); padding: 24px; margin: 16px 0 24px; text-align: center; }
.tsd-row { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 8px; font-family: var(--font-code); font-size: 1rem; flex-wrap: wrap; }
.tsd-tag { padding: 6px 14px; border-radius: 6px; font-weight: 700; }
.tsd-open { background: #1a2840; color: #79c0ff; }
.tsd-close { background: #1a2840; color: #79c0ff; }
.tsd-content { padding: 6px 14px; color: var(--text-secondary); border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.tsd-labels { display: flex; justify-content: center; gap: 0; font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }
.tsd-labels span { flex: 1; text-align: center; max-width: 140px; }

/* Note & Info boxes */
.tut-note-box { background: #fffde7; border-left: 4px solid #f59e0b; border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 16px; font-size: 0.88rem; color: var(--text-primary); margin: 20px 0; line-height: 1.6; }
.tut-note-box code { background: rgba(0,0,0,0.07); padding: 1px 5px; border-radius: 3px; font-size: 0.85em; }
.tut-info-box { background: var(--brand-light); border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; font-size: 0.88rem; color: var(--text-primary); margin: 20px 0; line-height: 1.6; }
.tut-info-icon { font-size: 1.2rem; flex-shrink: 0; }

/* Page structure diagram */
.tut-page-structure { background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin: 20px 0; }
.tps-box { border: 2px solid; border-radius: var(--radius); padding: 12px; }
.tps-html { border-color: #e44d26; }
.tps-head { border-color: #264de4; margin: 8px; }
.tps-body { border-color: #28a745; margin: 8px; }
.tps-tag { font-family: var(--font-code); font-size: 0.8rem; font-weight: 700; margin-bottom: 8px; display: block; }
.tps-html > .tps-tag { color: #e44d26; }
.tps-head > .tps-tag { color: #264de4; }
.tps-body > .tps-tag { color: #28a745; }
.tps-inner { display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.tps-item { background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-family: var(--font-code); font-size: 0.78rem; color: var(--text-secondary); }
.tps-h1 { color: #e44d26; font-weight: 700; }
.tps-p { color: var(--text-secondary); }

/* Chapter nav */
.tut-chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.tut-nav-prev, .tut-nav-next {
    background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
    padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; transition: all 0.15s;
}
.tut-nav-next { text-align: right; }
.tut-nav-prev:hover, .tut-nav-next:hover { border-color: var(--brand); background: var(--brand-light); text-decoration: none; }
.tut-nav-dir { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.tut-nav-title { font-weight: 600; color: var(--brand); }

/* Right rail */
.tutorial-right-rail { padding: 24px 16px; border-left: 1px solid var(--border); position: sticky; top: var(--header-h); height: fit-content; }
.rail-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
.rail-card h4 { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; }
.rail-toc { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rail-toc a { font-size: 0.82rem; color: var(--text-secondary); }
.rail-toc a:hover { color: var(--brand); }
.rail-card--highlight { background: var(--brand-light); border-color: #bfdbfe; }
.quick-ref { display: flex; flex-direction: column; gap: 6px; }
.qr-item { font-size: 0.8rem; color: var(--text-secondary); display: flex; gap: 8px; align-items: center; }
.qr-item code { background: var(--bg-code); color: #79c0ff; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero, .contact-hero, .policy-hero {
    background: linear-gradient(180deg, var(--bg-alt) 0%, white 100%);
    padding: 64px 0 48px; text-align: center;
}
.about-title, .contact-title, .policy-title {
    font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
    margin: 12px 0 16px; line-height: 1.2;
}
.about-subtitle, .contact-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.accent { color: var(--brand); }

.about-mission { padding: 64px 0; }
.mission-grid { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.mission-text h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; }
.mission-text p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 16px; }
.mission-text code { font-size: 0.9em; background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; }
.mission-stats-card { background: var(--bg-alt); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mstat { display: flex; flex-direction: column; gap: 4px; }
.mstat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--brand); }
.mstat-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.about-values, .about-team { padding: 64px 0; background: var(--bg-alt); }
.about-team { background: white; }
.values-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.value-card { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.value-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.value-icon { font-size: 1.8rem; margin-bottom: 12px; }
.value-card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.value-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-body { padding: 64px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.contact-form-card { background: white; border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 36px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.form-group input, .form-group select, .form-group textarea {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 10px 14px; font-family: var(--font-body); font-size: 0.9rem; color: var(--text-primary);
    background: var(--bg-alt); transition: border-color 0.15s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand-focus); background: white; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error { font-size: 0.78rem; color: #ef4444; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; border-radius: var(--radius); padding: 12px 16px; font-size: 0.88rem; color: #166534; margin-bottom: 20px; }
.contact-info { display: flex; flex-direction: column; gap: 12px; }
.contact-info-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; gap: 14px; }
.cic-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-info-card h4 { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.contact-info-card p { font-size: 0.83rem; color: var(--text-secondary); margin: 0; line-height: 1.55; }

/* ============================================================
   PRIVACY POLICY
   ============================================================ */
.policy-meta { color: var(--text-muted); font-size: 0.88rem; margin-top: 8px; }
.policy-body { padding: 56px 0; }
.policy-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.policy-toc-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: calc(var(--header-h) + 16px); }
.policy-toc-card h4 { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; }
.policy-toc-card ol { padding-left: 16px; display: flex; flex-direction: column; gap: 8px; }
.policy-toc-card a { font-size: 0.82rem; color: var(--text-secondary); }
.policy-toc-card a:hover { color: var(--brand); }
.policy-content section { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.policy-content section:last-child { border-bottom: none; margin-bottom: 0; }
.policy-content h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin-bottom: 12px; }
.policy-content h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 8px; }
.policy-content p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }
.policy-content ul { padding-left: 20px; margin-bottom: 12px; }
.policy-content li { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.65; }
.policy-content strong { color: var(--text-primary); }
.policy-content code { font-size: 0.85em; background: var(--bg-alt); padding: 2px 6px; border-radius: 4px; }
.policy-table-wrap { overflow-x: auto; margin: 12px 0; }
.policy-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.policy-table th { background: var(--bg-alt); text-align: left; padding: 10px 12px; border: 1px solid var(--border); font-weight: 600; }
.policy-table td { padding: 10px 12px; border: 1px solid var(--border); color: var(--text-secondary); }
.policy-contact-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.policy-contact-box p { margin: 0; line-height: 1.8; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .tutorials-grid { grid-template-columns: repeat(2,1fr); }
    .why-grid { grid-template-columns: repeat(2,1fr); }
    .values-grid { grid-template-columns: repeat(2,1fr); }
    .tutorial-layout { grid-template-columns: var(--sidebar-w) 1fr; }
    .tutorial-right-rail { display: none; }
    .footer-top { grid-template-columns: 1fr; gap: 32px; }
    .footer-links { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero { min-height: auto; padding: 60px 24px; }
    .featured-body { grid-template-columns: 1fr; }
    .mission-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .policy-layout { grid-template-columns: 1fr; }
    .policy-toc-card { position: static; }
    .tutorial-layout { grid-template-columns: 1fr; }
    .tutorial-sidebar { display: none; }
    .tutorial-content { padding: 24px 20px; }
}

@media (max-width: 768px) {
    .main-nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: white; flex-direction: column; padding: 24px; gap: 4px; z-index: 999; overflow-y: auto; }
    .main-nav.mobile-open { display: flex; }
    .nav-dropdown .dropdown-menu { position: static; display: none; box-shadow: none; border: 1px solid var(--border); flex-direction: column; min-width: auto; }
    .nav-dropdown:hover .dropdown-menu { display: none; }
    .hamburger { display: flex; }
    .header-actions .btn-primary { display: none; }
    .tutorials-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .tut-explanation-grid { grid-template-columns: 1fr; }
    .tut-chapter-nav { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .mission-stats-card { grid-template-columns: 1fr 1fr; }
    .tsd-row { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .why-grid { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: 1fr; }
    .contact-form-card { padding: 20px; }
    .tut-syntax-diagram { padding: 16px; }
}
@media (max-width: 900px) {

.sidebar-toggle{
        display:flex;
        align-items:center;
        gap:6px;
        position:fixed;
        bottom:88px;
        left:20px;
        z-index:1002;
        background:var(--brand);
        color:#fff;
        border:none;
        border-radius:50px;
        padding:12px 16px;
        font-size:0.85rem;
        font-weight:600;
        box-shadow:0 6px 20px rgba(0,0,0,0.25);
        cursor:pointer;
        white-space:nowrap;
    }
.tutorial-sidebar{
        display:block;
        position:fixed;
        top:0;
        left:-280px;
        width:280px;
        height:100vh;
        z-index:1101;
        background:#fff;
        transition:.3s;
    }

    .tutorial-sidebar.active{
        left:0;
    }

    .sidebar-overlay{
        display:none;
        position:fixed;
        inset:0;
        background:rgba(0,0,0,0.45);
        z-index:1100;
    }

    .sidebar-overlay.active{
        display:block;
    }
}