/* ─────────────────────────────────────────
   DDM Showcase — Clean Research Portfolio
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-app:        #FAFBFF;
  --bg-surface:    #FFFFFF;
  --bg-muted:      #F1F5F9;
  --border:        #E2E8F0;
  --border-focus:  #CBD5E1;
  --text-heading:  #0F172A;
  --text-body:     #334155;
  --text-muted:    #64748B;
  --primary:       #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --shadow-sm:     0 1px 3px rgba(15,23,42,0.06);
  --shadow-md:     0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg:     0 10px 30px rgba(15,23,42,0.10);
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --transition:    all 0.2s ease;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg-app); color: var(--text-body); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb { background: var(--border-focus); border-radius: 4px; }

/* ── NAVBAR ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 0; transition: var(--transition); background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.navbar.scrolled { padding: 14px 0; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text-heading); }
.logo-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 8px; font-size: 1.1rem; font-weight: 900; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--text-heading); background: var(--bg-muted); }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: 1px solid var(--border); cursor: pointer; padding: 8px; border-radius: var(--radius-sm); }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-heading); border-radius: 1px; }

/* ── LANGUAGE SELECTOR ── */
.lang-selector { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-body); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-sm); }
.lang-btn:hover { background: var(--bg-muted); border-color: var(--border-focus); }
.lang-btn:active { transform: none; box-shadow: none; }
.lang-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); border-radius: var(--radius-md); min-width: 200px; display: none; z-index: 200; padding: 6px 0; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
.lang-dropdown.open { display: block; animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.lang-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; background: none; border: none; color: var(--text-body); font-size: 0.875rem; cursor: pointer; text-align: left; transition: var(--transition); font-family: inherit; font-weight: 500; }
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: var(--bg-muted); color: var(--text-heading); }
.lang-option.active { color: var(--primary); background: var(--primary-light); }
.lang-option .lang-native { font-weight: 700; }
.lang-option .lang-en { font-size: 0.75rem; opacity: 0.6; margin-left: auto; }

/* ── HERO ── */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding: 160px 48px 80px;
  background: linear-gradient(135deg, #ffffff 0%, #EFF6FF 50%, #DBEAFE 100%);
  overflow: hidden;
}
.hero-content { position: relative; text-align: left; width: 100%; max-width: 1100px; z-index: 2; padding: 0; background: transparent; border: none; box-shadow: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: none; padding: 0; font-size: 0.82rem; font-weight: 700; color: var(--primary); margin-bottom: 28px; text-transform: uppercase; box-shadow: none; letter-spacing: 2px; }
.badge-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
.hero-title { font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 24px; color: var(--text-heading); text-transform: none; }
.gradient-text { background: none; -webkit-text-fill-color: inherit; color: var(--text-heading); text-shadow: none; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 48px; line-height: 1.7; font-weight: 400; max-width: 520px; }
.hero-actions { display: flex; align-items: center; justify-content: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent; transition: var(--transition); text-transform: none; letter-spacing: 0; box-shadow: none; border-radius: var(--radius-sm); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,0.28); }
.btn-primary:active { transform: none; box-shadow: none; }
.btn-ghost { background: var(--bg-surface); color: var(--text-heading); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-muted); border-color: var(--border-focus); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost:active { transform: none; box-shadow: none; }
.hero-stats { display: inline-flex; align-items: center; background: rgba(255,255,255,0.85); border: 1px solid var(--border); padding: 20px 40px; box-shadow: var(--shadow-md); flex-wrap: wrap; justify-content: center; gap: 0; border-radius: var(--radius-lg); backdrop-filter: blur(8px); }
.stat-item { text-align: center; padding: 0 32px; }
.stat-number { display: block; font-size: 2.4rem; font-weight: 800; color: var(--text-heading); -webkit-text-fill-color: var(--text-heading); background: none; line-height: 1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; background: none; padding: 0; border: none; display: block; margin-top: 6px; }
.stat-divider { width: 1px; height: 44px; background: var(--border); }
.orb, .scroll-indicator { display: none; }

/* ── SECTIONS ── */
section { padding: 96px 0; }
.section-header { margin-bottom: 56px; max-width: 640px; }
.section-tag { display: inline-block; color: var(--primary); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; color: var(--text-heading); }
.section-desc { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }

/* ── ABOUT ── */
.about { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.about-card { background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; transition: var(--transition); }
.about-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-focus); }
.about-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; margin-bottom: 20px; }
.about-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--text-heading); }
.about-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.about-tags span { background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-body); font-size: 0.72rem; font-weight: 500; padding: 3px 9px; border-radius: 4px; }

/* ── ASSIGNMENTS ── */
.assignments { background: var(--bg-app); }
.assignment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.assignment-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: var(--transition); box-shadow: var(--shadow-sm); }
.assignment-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-focus); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--bg-app); }
.card-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.assignment-card:nth-child(odd) .card-badge { background: #EFF6FF; color: var(--primary); }
.assignment-card:nth-child(even) .card-badge { background: #F0FDF4; color: #059669; }
.card-number { font-size: 1.6rem; font-weight: 300; color: var(--border-focus); letter-spacing: -0.02em; }
.card-body { padding: 24px; flex: 1; }
.card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; color: var(--text-heading); }
.card-subtitle { font-size: 0.8rem; color: var(--primary); font-weight: 600; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.card-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }
.card-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tech span { background: var(--bg-muted); color: var(--text-body); border-radius: 4px; padding: 3px 9px; font-size: 0.72rem; font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.card-footer { border-top: 1px solid var(--border); padding: 16px 24px; background: var(--bg-app); }
.card-link { font-size: 0.875rem; font-weight: 600; color: var(--primary); display: flex; align-items: center; justify-content: space-between; transition: var(--transition); }
.assignment-card:hover .card-link { color: var(--primary-hover); }
.card-link::after { content: '→'; font-size: 1.1rem; transition: transform 0.2s; }
.assignment-card:hover .card-link::after { transform: translateX(4px); }

/* ── SKILLS ── */
.skills { background: var(--bg-surface); border-top: 1px solid var(--border); }
.skills-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-item { display: flex; align-items: center; gap: 10px; background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 18px; transition: var(--transition); }
.skill-item:hover { border-color: var(--primary); background: var(--primary-light); }
.skill-item span { font-size: 0.875rem; color: var(--text-body); font-weight: 500; }
.skill-icon { display: none; }

/* ── FOOTER ── */
.footer { background: var(--text-heading); border-top: 1px solid rgba(255,255,255,0.08); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; color: #fff; }
.footer-brand span.logo-icon { background: var(--primary); color: #fff; }
.footer-copy { font-size: 0.85rem; color: #94A3B8; }
.footer-links a { font-size: 0.875rem; color: #94A3B8; transition: var(--transition); margin-left: 20px; }
.footer-links a:hover { color: #fff; }

/* ── INNER/DETAIL PAGES ── */
.inner-hero { padding: 140px 32px 64px; background: linear-gradient(135deg, #ffffff 0%, #EFF6FF 60%, #DBEAFE 100%); text-align: left; border-bottom: 1px solid var(--border); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 28px; transition: var(--transition); background: rgba(255,255,255,0.8); }
.back-link:hover { color: var(--text-heading); background: var(--bg-surface); border-color: var(--border-focus); transform: none; box-shadow: var(--shadow-sm); }
.inner-hero .card-badge { display: inline-block; margin-bottom: 20px; background: var(--primary-light); color: var(--primary); border: none; font-weight: 700; padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; box-shadow: none; }
.inner-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; color: var(--text-heading); text-transform: none; text-shadow: none; }
.inner-sub { color: var(--primary); font-size: 1rem; margin-bottom: 28px; font-weight: 600; background: none; display: block; padding: 0; border: none; box-shadow: none; text-transform: none; }
.inner-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); background: rgba(255,255,255,0.8); border: 1px solid var(--border); padding: 6px 14px; font-weight: 500; box-shadow: none; text-transform: none; border-radius: var(--radius-sm); }

/* ── CONTENT COMMON ── */
.lab-content, .theory-content { padding: 64px 0 100px; background: var(--bg-app); }
.exp-section, .theory-section { margin-bottom: 32px; padding: 40px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.exp-header { margin-bottom: 28px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.exp-num { width: 40px !important; height: 40px !important; background: var(--primary-light) !important; color: var(--primary); display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.85rem !important; border-radius: var(--radius-sm) !important; border: none !important; box-shadow: none !important; flex-shrink: 0; }
.exp-header h2, .theory-section h2 { font-size: 1.4rem !important; font-weight: 700; color: var(--text-heading); text-transform: none; border-bottom: none; padding-bottom: 0; margin-bottom: 0; display: block; line-height: 1.3; }
.content-block { background: var(--bg-surface); border: 1px solid var(--border); padding: 32px; margin-bottom: 24px; box-shadow: none; border-radius: var(--radius-md); }
.content-block p, .theory-section p { color: var(--text-body); line-height: 1.75; font-size: 1rem; font-weight: 400; margin-bottom: 16px; }
.content-block h4 { font-size: 0.95rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: none; display: inline-block; margin-bottom: 16px; padding: 0; background: none; box-shadow: none; }

/* CODE BLOCKS */
.code-block { background: #0F172A; border-radius: var(--radius-md); border: 1px solid #1E293B; margin-bottom: 28px; overflow: hidden; box-shadow: var(--shadow-md); }
.code-header { background: #1E293B; border-bottom: 1px solid #334155; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 12px; height: 12px; border: none; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #EF4444; } .code-dots span:nth-child(2) { background: #F59E0B; } .code-dots span:nth-child(3) { background: #10B981; }
.code-lang { font-size: 0.72rem; font-family: 'JetBrains Mono', monospace; color: #94A3B8; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
pre { padding: 24px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.7; color: #E2E8F0; background: transparent; }
.kw { color: #F472B6; font-weight: 600; } .fn { color: #60A5FA; } .str { color: #34D399; } .cm { color: #475569; font-style: italic; } .num { color: #FBBF24; }

/* STEPS */
.step { display: flex; align-items: flex-start; gap: 16px; padding: 16px; background: var(--bg-app); border: 1px solid var(--border); margin-bottom: 12px; box-shadow: none; border-radius: var(--radius-sm); }
.step-num { width: 28px; height: 28px; background: var(--primary); color: #fff; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: 0.8rem; border-radius: var(--radius-sm); display: flex; }
.step-text { font-size: 0.95rem; font-weight: 400; color: var(--text-body); }

/* SCREENSHOTS / PDF */
.output-section { margin-bottom: 32px; }
.output-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text-heading); text-transform: none; background: none; display: block; padding: 0; border: none; box-shadow: none; }
.screenshot-card { background: var(--bg-surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 20px; overflow: hidden; border-radius: var(--radius-md); }
.screenshot-header { background: var(--bg-app); border-bottom: 1px solid var(--border); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.screenshot-label { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-weight: 500; text-transform: none; }
.screenshot-card img { width: 100%; border-top: none; display: block; border-radius: 0; }
.pdf-container { border: 1px solid var(--border) !important; box-shadow: var(--shadow-md) !important; border-radius: var(--radius-md) !important; background: var(--bg-muted); }

/* THEORY EXTRAS */
.toc-card { background: var(--primary-light); border: 1px solid #BFDBFE; padding: 32px; margin-bottom: 32px; box-shadow: none; border-radius: var(--radius-lg); }
.toc-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--primary); text-transform: none; border-bottom: 1px solid #BFDBFE; display: block; padding-bottom: 12px; }
.toc-item { font-size: 0.9rem; color: var(--text-body); font-weight: 500; margin-bottom: 12px; display: flex; align-items: center; }
.toc-item span:first-child { background: var(--primary); color: #fff; padding: 3px 10px; margin-right: 14px; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; border-radius: 4px; }
.insight-box { background: #F0FDF4; border: 1px solid #BBF7D0; border-left: 4px solid #10B981; padding: 24px; margin: 28px 0; border-radius: var(--radius-md); }
.insight-box .insight-label { font-size: 0.78rem; font-weight: 700; color: #065F46; background: #D1FAE5; display: inline-block; padding: 4px 10px; border: none; box-shadow: none; margin-bottom: 12px; text-transform: uppercase; border-radius: 4px; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; font-size: 0.9rem; box-shadow: none; }
.compare-table th { background: var(--bg-muted); color: var(--text-heading); font-weight: 700; text-align: left; padding: 14px 18px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); border: none; border-bottom: 1px solid var(--border); }
.compare-table td { padding: 14px 18px; color: var(--text-body); border: none; border-bottom: 1px solid var(--border); font-weight: 400; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--bg-app); }

/* RESULT CARD */
.result-card { background: var(--bg-app); border: 1px solid var(--border); padding: 24px; margin-top: 24px; border-radius: var(--radius-md); }
.result-card h4 { color: var(--primary); font-size: 0.875rem; margin-bottom: 12px; font-weight: 700; background: none; display: block; padding: 0; border: none; box-shadow: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; position: fixed; top: 70px; left: 0; right: 0; background: rgba(255,255,255,0.98); backdrop-filter: blur(8px); flex-direction: column; align-items: stretch; padding: 16px 24px; gap: 4px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-link { text-align: center; padding: 12px; }
  .hamburger { display: flex; }
  .hero { padding: 130px 24px 60px; }
  .hero-content { text-align: left; }
  .inner-hero { padding: 120px 24px 48px; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 2.4rem; }
  .assignment-grid, .about-grid { grid-template-columns: 1fr; }
  .exp-section, .theory-section, .content-block { padding: 24px; }
}
