/* ASTU / CoEEC brand, matching the main portal */
:root {
  --primary: #234B72;
  --primary-dark: #183754;
  --secondary: #F03C02;
  --neutral: #f3f4f6;
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --blue-100: #dbeafe;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --serif: "Merriweather", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--gray-900);
  background: var(--neutral);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.logo { height: 40px; width: auto; }
.university { font-family: var(--serif); font-weight: 700; font-size: 0.875rem; color: var(--primary); line-height: 1.3; }
.tagline { font-size: 0.75rem; color: var(--gray-500); }
@media (min-width: 640px) { .university { font-size: 1rem; } }

/* Hero */
.hero {
  position: relative;
  background: var(--primary) url("/images/building.jpg") center / cover no-repeat;
  background-blend-mode: multiply;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(35, 75, 114, 0.92), rgba(35, 75, 114, 0.7), rgba(35, 75, 114, 0.15));
}
.hero-content { position: relative; padding-top: 4rem; padding-bottom: 4rem; }
.accent-bar { display: block; width: 48px; height: 4px; border-radius: 999px; background: var(--secondary); margin-bottom: 1rem; }
.hero h1 { max-width: 42rem; font-size: 1.875rem; line-height: 1.2; color: var(--white); }
.hero p { max-width: 56rem; margin-top: 1rem; font-size: 1rem; line-height: 1.7; color: var(--blue-100); text-align: justify; }
@media (min-width: 768px) {
  .hero-content { padding-top: 6rem; padding-bottom: 6rem; }
  .hero h1 { font-size: 3rem; }
  .hero p { font-size: 1.0625rem; }
}

/* Coming-soon page */
.brand-link { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; }
.coming-soon { flex: 1; display: flex; align-items: center; }
.coming-soon .hero-content { width: 100%; }
.soon-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.back-link { display: inline-block; margin-top: 2rem; color: var(--white); font-weight: 600; text-decoration: none; }
.back-link:hover { color: var(--secondary); }

/* Portal list */
.main { flex: 1; padding-top: 3rem; padding-bottom: 3rem; }
.section-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.section-head h2 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; }
.title-bar { width: 4px; height: 24px; border-radius: 999px; background: var(--secondary); }

.search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
}
.search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
@media (min-width: 640px) { .search { width: 18rem; } }

.grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card-wrap { position: relative; display: flex; flex-direction: column; }
.card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  color: inherit;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
a.card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
a.card:hover .card-accent { transform: scaleX(1); }

.card-top { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 0.5rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.card-text { min-width: 0; }
.card-text h3 { font-size: 1.125rem; line-height: 1.4; }
.card-text p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: var(--gray-600); }

.card-bottom {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.875rem;
  font-weight: 600;
}
.enter, .soon { display: inline-flex; align-items: center; gap: 0.5rem; }
.enter { color: var(--primary); transition: color 0.2s; }
.enter svg { transition: transform 0.2s; }
a.card:hover .enter { color: var(--secondary); }
a.card:hover .enter svg { transform: translateX(4px); }
.soon { color: var(--gray-400); }

.card-soon { border-style: dashed; border-color: var(--gray-200); background: rgba(255, 255, 255, 0.6); opacity: 0.85; }

.staff-link {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: none;
}
.staff-link:hover { color: var(--primary); }

.no-results { padding: 3rem 0; text-align: center; color: var(--gray-500); }

/* Footer */
.site-footer { background: var(--primary); color: var(--blue-100); font-size: 0.875rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }

/* Footer: credit and social links */
.footer-left { display: flex; flex-direction: column; gap: 0.25rem; text-align: center; }
@media (min-width: 640px) { .footer-left { text-align: left; } }
.footer-credit a { color: var(--white); font-weight: 600; text-decoration: none; }
.footer-credit a:hover { color: var(--secondary); text-decoration: underline; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: var(--secondary); }
