/* BIFE 2024 - IEEE Technical Style */
/* Primary: #cc0000 | Secondary: #1a1a1a | Accent: #ffffff */

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

:root {
  --ieee-red: #cc0000;
  --ieee-red-dark: #990000;
  --ieee-red-light: #e63946;
  --ieee-black: #1a1a1a;
  --ieee-gray-dark: #2d2d2d;
  --ieee-gray: #555555;
  --ieee-gray-light: #888888;
  --ieee-gray-lighter: #cccccc;
  --ieee-bg: #f4f4f4;
  --ieee-bg-light: #fafafa;
  --ieee-white: #ffffff;
  --ieee-border: #dddddd;
  --ieee-blue: #003366;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ieee-black);
  background: var(--ieee-white);
}

/* ===== IEEE TOP BAR ===== */
.ieee-topbar {
  background: var(--ieee-black);
  color: var(--ieee-white);
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 2px solid var(--ieee-red);
}
.ieee-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ieee-topbar a {
  color: #cccccc;
  text-decoration: none;
  margin-left: 18px;
  font-weight: 500;
}
.ieee-topbar a:hover { color: var(--ieee-red-light); }
.ieee-brand-mark { font-weight: 700; letter-spacing: 1px; }

/* ===== MAIN HEADER ===== */
.site-header {
  background: var(--ieee-white);
  border-bottom: 4px solid var(--ieee-red);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-block { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 56px;
  height: 56px;
  background: var(--ieee-red);
  color: var(--ieee-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.5px;
  border-radius: 2px;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ieee-black);
}
.logo-text { line-height: 1.2; }
.logo-text .conf-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ieee-black);
  letter-spacing: -0.3px;
}
.logo-text .conf-sub {
  font-size: 11px;
  color: var(--ieee-gray);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 2px;
}

/* ===== NAV ===== */
nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2px;
}
nav.main-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--ieee-black);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid transparent;
  transition: all 0.15s ease;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--ieee-red);
  border-bottom-color: var(--ieee-red);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(26,26,26,0.92) 0%, rgba(204,0,0,0.78) 100%),
              url('../images/hero-hangzhou.jpg') center/cover;
  color: var(--ieee-white);
  padding: 80px 0 70px;
  border-bottom: 4px solid var(--ieee-red);
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}
.hero-ribbon {
  display: inline-block;
  background: var(--ieee-red);
  color: var(--ieee-white);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -1px;
  max-width: 900px;
}
.hero h1 .accent { color: var(--ieee-red-light); }
.hero .lead {
  font-size: 18px;
  max-width: 720px;
  margin-bottom: 28px;
  color: #e8e8e8;
}
.hero-meta {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 18px 22px;
  background: rgba(0,0,0,0.55);
  border-left: 4px solid var(--ieee-red);
  display: inline-flex;
}
.hero-meta div { line-height: 1.3; }
.hero-meta .label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ieee-red-light);
  letter-spacing: 1.5px;
  font-weight: 700;
}
.hero-meta .value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ieee-white);
  margin-top: 2px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 26px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary {
  background: var(--ieee-red);
  color: var(--ieee-white);
  border-color: var(--ieee-red);
}
.btn-primary:hover { background: var(--ieee-red-dark); border-color: var(--ieee-red-dark); }
.btn-outline {
  background: transparent;
  color: var(--ieee-white);
  border-color: var(--ieee-white);
}
.btn-outline:hover { background: var(--ieee-white); color: var(--ieee-black); }
.btn-dark {
  background: var(--ieee-black);
  color: var(--ieee-white);
  border-color: var(--ieee-black);
}
.btn-dark:hover { background: var(--ieee-red); border-color: var(--ieee-red); }

/* ===== SECTION STYLES ===== */
section { padding: 60px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-header { margin-bottom: 40px; border-bottom: 3px solid var(--ieee-black); padding-bottom: 14px; position: relative; }
.section-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--ieee-red);
}
.section-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--ieee-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.section-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ieee-black);
  letter-spacing: -0.8px;
}
.section-sub {
  font-size: 15px;
  color: var(--ieee-gray);
  margin-top: 8px;
  max-width: 800px;
}

/* ===== INFO STRIP (Key facts) ===== */
.info-strip {
  background: var(--ieee-black);
  color: var(--ieee-white);
  padding: 0;
}
.info-strip-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.info-cell {
  padding: 28px 24px;
  border-right: 1px solid #333;
  text-align: center;
}
.info-cell:last-child { border-right: none; }
.info-cell .num {
  font-size: 30px;
  font-weight: 800;
  color: var(--ieee-red-light);
  display: block;
  line-height: 1;
}
.info-cell .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #cccccc;
  margin-top: 8px;
  display: block;
}

/* ===== TOPICS GRID ===== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--ieee-border);
  border: 1px solid var(--ieee-border);
}
.topic-cell {
  background: var(--ieee-white);
  padding: 26px 22px;
  transition: all 0.2s ease;
}
.topic-cell:hover {
  background: var(--ieee-bg);
  border-left: 4px solid var(--ieee-red);
  padding-left: 18px;
}
.topic-cell .num {
  font-size: 11px;
  color: var(--ieee-red);
  font-weight: 700;
  letter-spacing: 2px;
}
.topic-cell h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ieee-black);
  margin: 6px 0 10px;
}
.topic-cell p {
  font-size: 14px;
  color: var(--ieee-gray);
  line-height: 1.5;
}

/* ===== TWO COL ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.two-col img { width: 100%; height: auto; border: 1px solid var(--ieee-border); }
.bg-gray { background: var(--ieee-bg); }

/* ===== TIMELINE / DATES TABLE ===== */
.dates-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--ieee-border);
}
.dates-table th {
  background: var(--ieee-black);
  color: var(--ieee-white);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.dates-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ieee-border);
  font-size: 14px;
}
.dates-table tr:hover { background: var(--ieee-bg); }
.dates-table tr.passed td { color: var(--ieee-gray-light); text-decoration: line-through; }
.dates-table tr.passed td:first-child { text-decoration: none; }
.dates-table .pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.pill-red { background: var(--ieee-red); color: var(--ieee-white); }
.pill-black { background: var(--ieee-black); color: var(--ieee-white); }
.pill-gray { background: var(--ieee-gray-lighter); color: var(--ieee-black); }

/* ===== COMMITTEE ===== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.person-card {
  background: var(--ieee-white);
  border: 1px solid var(--ieee-border);
  border-top: 4px solid var(--ieee-red);
  padding: 22px 18px;
}
.person-card .role {
  font-size: 11px;
  color: var(--ieee-red);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.person-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ieee-black);
  margin-bottom: 4px;
}
.person-card .affil {
  font-size: 13px;
  color: var(--ieee-gray);
  line-height: 1.4;
}
.person-card .country {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ieee-gray-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== PROGRAM ===== */
.program-day {
  border: 1px solid var(--ieee-border);
  margin-bottom: 30px;
}
.program-day-header {
  background: var(--ieee-black);
  color: var(--ieee-white);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.program-day-header .day {
  font-size: 13px;
  color: var(--ieee-red-light);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.program-day-header .date {
  font-size: 18px;
  font-weight: 700;
}
.program-row {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  border-bottom: 1px solid var(--ieee-border);
  align-items: stretch;
}
.program-row:last-child { border-bottom: none; }
.program-row:hover { background: var(--ieee-bg); }
.program-time {
  background: var(--ieee-bg);
  padding: 14px 16px;
  font-weight: 700;
  color: var(--ieee-red);
  font-size: 13px;
  border-right: 1px solid var(--ieee-border);
}
.program-content { padding: 14px 18px; }
.program-content h5 { font-size: 15px; font-weight: 700; color: var(--ieee-black); }
.program-content p { font-size: 13px; color: var(--ieee-gray); margin-top: 3px; }
.program-track {
  padding: 14px 16px;
  font-size: 12px;
  text-align: right;
  color: var(--ieee-gray);
  border-left: 1px solid var(--ieee-border);
  background: var(--ieee-bg-light);
}
.program-track .tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--ieee-red);
  color: var(--ieee-white);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== PAPERS LIST ===== */
.paper-item {
  display: grid;
  grid-template-columns: 70px 1fr 140px;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--ieee-border);
  align-items: start;
}
.paper-item:last-child { border-bottom: none; }
.paper-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--ieee-red);
  font-family: 'Courier New', monospace;
  line-height: 1;
}
.paper-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ieee-black);
  margin-bottom: 6px;
  line-height: 1.3;
}
.paper-body h3 a { color: var(--ieee-black); text-decoration: none; }
.paper-body h3 a:hover { color: var(--ieee-red); }
.paper-body .authors {
  font-size: 13px;
  color: var(--ieee-gray);
  font-style: italic;
  margin-bottom: 6px;
}
.paper-body .affil {
  font-size: 12px;
  color: var(--ieee-gray-light);
  margin-bottom: 8px;
}
.paper-body .abs-snippet {
  font-size: 13px;
  color: var(--ieee-gray-dark);
  line-height: 1.5;
  margin-bottom: 10px;
}
.paper-body .keywords { font-size: 11px; color: var(--ieee-gray-light); }
.paper-body .keywords span {
  display: inline-block;
  padding: 2px 8px;
  background: var(--ieee-bg);
  border: 1px solid var(--ieee-border);
  margin-right: 4px;
  margin-bottom: 4px;
}
.paper-meta { text-align: right; font-size: 12px; color: var(--ieee-gray); }
.paper-meta .doi { font-family: 'Courier New', monospace; font-size: 11px; }

/* ===== KEYNOTES ===== */
.keynote-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 26px;
  border: 1px solid var(--ieee-border);
  border-left: 4px solid var(--ieee-red);
  padding: 26px;
  margin-bottom: 24px;
  background: var(--ieee-white);
}
.keynote-photo {
  width: 180px;
  height: 180px;
  background: var(--ieee-black) center/cover;
  color: var(--ieee-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 800;
}
.keynote-body .label {
  font-size: 11px;
  color: var(--ieee-red);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.keynote-body h3 { font-size: 22px; margin: 6px 0 4px; }
.keynote-body .affil { font-size: 13px; color: var(--ieee-gray); margin-bottom: 12px; }
.keynote-body .talk-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ieee-red);
  margin: 12px 0 6px;
}
.keynote-body p { font-size: 14px; color: var(--ieee-gray-dark); line-height: 1.6; }

/* ===== VENUE / MAP ===== */
.venue-card {
  background: var(--ieee-white);
  border: 1px solid var(--ieee-border);
  padding: 0;
  margin-bottom: 30px;
}
.venue-card img { width: 100%; display: block; }
.venue-card .body { padding: 24px; }
.venue-card h3 { font-size: 22px; color: var(--ieee-black); margin-bottom: 8px; }
.venue-card .addr { font-size: 14px; color: var(--ieee-gray); line-height: 1.6; }

/* ===== SPONSORS ===== */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}
.sponsor-logo {
  border: 1px solid var(--ieee-border);
  padding: 30px 20px;
  text-align: center;
  background: var(--ieee-white);
  font-weight: 700;
  font-size: 14px;
  color: var(--ieee-black);
  letter-spacing: 1px;
}
.sponsor-logo .sub { font-size: 10px; color: var(--ieee-gray); margin-top: 4px; }

/* ===== CONTACT FORM ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ieee-black);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ieee-border);
  font-family: inherit;
  font-size: 14px;
  background: var(--ieee-white);
}
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--ieee-red); }
.form-row textarea { min-height: 140px; resize: vertical; }

/* ===== PROCEEDINGS PAGE ===== */
.proceedings-cover {
  background: linear-gradient(135deg, var(--ieee-black), var(--ieee-red-dark));
  color: var(--ieee-white);
  padding: 60px 40px;
  margin-bottom: 40px;
  border-bottom: 6px solid var(--ieee-red);
  text-align: center;
}
.proceedings-cover .isbn {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--ieee-red-light);
  letter-spacing: 1px;
  margin-top: 12px;
}
.proceedings-cover h1 { font-size: 38px; max-width: 900px; margin: 0 auto; }

.toc-section {
  border-left: 4px solid var(--ieee-red);
  padding: 16px 20px;
  background: var(--ieee-bg);
  margin: 30px 0 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ieee-black);
}

/* ===== FOOTER ===== */
footer.site-footer {
  background: var(--ieee-black);
  color: #cccccc;
  padding: 50px 0 0;
  border-top: 6px solid var(--ieee-red);
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col h5 {
  color: var(--ieee-white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ieee-red);
  display: inline-block;
}
.footer-col p, .footer-col a {
  font-size: 13px;
  color: #aaaaaa;
  line-height: 1.7;
  text-decoration: none;
  display: block;
}
.footer-col a:hover { color: var(--ieee-red-light); }
.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 40px;
  padding: 18px 20px;
  text-align: center;
  font-size: 12px;
  color: #888;
}
.footer-bottom .ieee-line {
  color: var(--ieee-red-light);
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

/* ===== UTILS ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.callout {
  background: #fff4f4;
  border-left: 4px solid var(--ieee-red);
  padding: 18px 22px;
  margin: 20px 0;
}
.callout strong { color: var(--ieee-red); }

.breadcrumb {
  background: var(--ieee-bg);
  padding: 12px 0;
  border-bottom: 1px solid var(--ieee-border);
  font-size: 12px;
}
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.breadcrumb a { color: var(--ieee-gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--ieee-red); }
.breadcrumb .sep { color: var(--ieee-gray-light); margin: 0 8px; }
.breadcrumb .current { color: var(--ieee-black); font-weight: 600; }

.page-header {
  background: linear-gradient(135deg, var(--ieee-black) 0%, #2d2d2d 100%);
  color: var(--ieee-white);
  padding: 50px 0;
  border-bottom: 4px solid var(--ieee-red);
}
.page-header h1 { font-size: 36px; font-weight: 800; }
.page-header .sub { color: #cccccc; margin-top: 8px; font-size: 15px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-inner { flex-direction: column; gap: 14px; }
  nav.main-nav ul { flex-wrap: wrap; justify-content: center; }
  .hero h1 { font-size: 30px; }
  .info-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .keynote-card { grid-template-columns: 1fr; }
  .keynote-photo { width: 100%; height: 200px; }
  .program-row { grid-template-columns: 100px 1fr; }
  .program-track { display: none; }
  .paper-item { grid-template-columns: 50px 1fr; }
  .paper-meta { grid-column: 1 / -1; text-align: left; }
}
