/*
Theme Name: INS3281 Capstone Project I
Theme URI: https://longndt.com
Author: Nguyen Dinh Tran Long
Author URI: https://longndt.com
Description: Official course website theme for INS3281 - Capstone Project I at VNU International School
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ins3281
*/

/* ========================================
   CSS Variables & Base
======================================== */
:root {
  --primary:    #0d1b4b;
  --primary-light: #1a3080;
  --accent:     #c8a832;
  --accent-dark: #a68820;
  --text:       #1f2937;
  --text-muted: #6b7280;
  --bg:         #f8fafc;
  --bg-card:    #ffffff;
  --border:     #e5e7eb;
  --red:        #b91c1c;
  --shadow:     0 4px 24px rgba(13,27,75,0.10);
  --radius:     12px;
  --radius-sm:  6px;
  --transition: 0.25s ease;
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

/* ========================================
   Layout
======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 16px auto 24px;
  border-radius: 2px;
}

/* ========================================
   Header / Nav
======================================== */
#site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.site-branding .badge {
  background: var(--accent);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.site-branding .site-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}
.site-branding .site-sub {
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  font-weight: 400;
}

#primary-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
}
#primary-nav ul li a {
  display: block;
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item a {
  background: rgba(255,255,255,0.12);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ========================================
   Hero
======================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3080 50%, #0d1b4b 100%);
  color: white;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(200,168,50,0.2);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  color: white;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 8px;
}
.hero h1 span { color: var(--accent); }
.hero-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.15rem;
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}
.hero-meta-item .icon {
  font-size: 1.1rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,168,50,0.4);
}
.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.35);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  color: white;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.stat-card .stat-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-card .stat-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* ========================================
   About Section
======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: start;
}
.about-content h2 {
  font-size: 1.9rem;
  margin-bottom: 16px;
}
.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.75;
}
.clo-list {
  margin-top: 24px;
}
.clo-list h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.clo-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.clo-badge {
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 2px;
}
.clo-text { font-size: 0.9rem; color: var(--text-muted); }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.info-card h3 {
  font-size: 1.05rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-val { font-weight: 600; color: var(--primary); }

.assessment-bar {
  margin-top: 24px;
}
.assess-item {
  margin-bottom: 16px;
}
.assess-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.assess-name { font-weight: 600; }
.assess-pct { color: var(--accent); font-weight: 700; }
.assess-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.assess-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
}

/* ========================================
   Topics / Lectures Grid
======================================== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,27,75,0.15); }
.topic-card:hover::before { transform: scaleX(1); }
.topic-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  margin-bottom: 12px;
}
.topic-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.topic-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.topic-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-light);
}

/* ========================================
   Materials / Downloads
======================================== */
.materials-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn.active, .tab-btn:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.material-list { display: none; }
.material-list.active { display: block; }

.material-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: all var(--transition);
}
.material-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(13,27,75,0.08);
}
.material-icon {
  width: 44px;
  height: 44px;
  background: rgba(184,28,28,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}
.material-info { flex: 1; min-width: 0; }
.material-info h4 {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.material-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.material-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--transition);
}
.material-dl:hover { background: var(--primary-light); color: white; }

/* ========================================
   Instructors
======================================== */
.instructors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 760px;
  margin: 0 auto;
}
.instructor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.instructor-card:hover { transform: translateY(-4px); }
.instructor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: white;
  font-weight: 700;
}
.instructor-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.instructor-card .title {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.instructor-card .email {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.instructor-card .email a { color: var(--primary-light); }

/* ========================================
   Callout / CTA
======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 72px 0;
  text-align: center;
}
.cta-section h2 { color: white; font-size: 2rem; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.75); margin-bottom: 32px; font-size: 1.05rem; }

/* ========================================
   Page Banner
======================================== */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 64px 0 48px;
}
.page-banner h1 { color: white; font-size: 2.4rem; margin-bottom: 10px; }
.page-banner .breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.page-banner .breadcrumb a { color: var(--accent); }
.page-banner .breadcrumb span { margin: 0 6px; }

/* ========================================
   Syllabus Table
======================================== */
.syllabus-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
}
.syllabus-table th {
  background: var(--primary);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.syllabus-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.syllabus-table tr:last-child td { border-bottom: none; }
.syllabus-table tr:hover td { background: rgba(13,27,75,0.03); }
.week-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ========================================
   Contact
======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info h2 { font-size: 1.8rem; margin-bottom: 16px; }
.contact-info p { color: var(--text-muted); margin-bottom: 28px; line-height: 1.75; }
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.contact-item-icon {
  width: 42px;
  height: 42px;
  background: rgba(13,27,75,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-item-info .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-item-info .value { font-weight: 600; font-size: 0.92rem; }
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.contact-form-card h3 { margin-bottom: 24px; font-size: 1.2rem; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition);
  background: var(--bg);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-submit:hover { background: var(--primary-light); }

/* ========================================
   Footer
======================================== */
#site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .name {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.footer-brand .code {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.65; }
.footer-col h4 {
  color: white;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--accent); }

/* ========================================
   Bg alternating
======================================== */
.bg-white { background: white; }
.bg-gray { background: var(--bg); }
.bg-primary { background: var(--primary); }

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 2.2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
  .instructors-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-toggle { display: block; }
  #primary-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--primary);
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  #primary-nav.open { display: block; }
  #primary-nav ul { flex-direction: column; gap: 2px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
}
