@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --primary-color: #0d5c31;
  /* UIN Green */
  --primary-light: #16A34A;
  --primary-dark: #064E3B;
  --accent-color: #F59E0B;
  /* Gold */

  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --surface-hover: #f1f5f9;

  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;

  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.8);

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgba(22, 163, 74, 0.4);

  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --bg-color: #0f172a;
  /* Slate 900 */
  --surface-color: #1e293b;
  /* Slate 800 */
  --surface-hover: #334155;
  /* Slate 700 */

  --text-dark: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --border-color: #334155;
  /* Slate 700 */

  --glass-bg: rgba(30, 41, 59, 0.5);
  --glass-border: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

/* Reset & Base HTML */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

/* Main Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

[data-theme='dark'] header {
  background-color: rgba(30, 41, 59, 0.65);
}

[data-theme='dark'] header.scrolled {
  background-color: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(16px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-area img {
  height: 48px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text span.brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-color);
  line-height: 1.1;
}

[data-theme='dark'] .logo-text span.brand {
  color: var(--primary-light);
}

.logo-text span.tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu li a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-light);
  transition: var(--transition);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
  width: 100%;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--primary-color);
}

[data-theme='dark'] .nav-menu li a:hover,
[data-theme='dark'] .nav-menu li a.active {
  color: var(--primary-light);
}

/* Theme Toggle Button */
.btn-toggle-theme {
  background: var(--surface-hover);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-theme:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding-top: 120px;
  padding-bottom: 4rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--surface-hover) 100%);
  z-index: -2;
}

/* Pattern overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(var(--text-muted) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.1;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(6, 78, 59, 0.1);
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-theme='dark'] .badge {
  background-color: rgba(22, 163, 74, 0.2);
  color: var(--primary-light);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--primary-color);
}

[data-theme='dark'] .hero-title span {
  color: var(--primary-light);
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.btn-group {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--surface-hover);
  border-color: var(--text-dark);
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-item {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.col-span-12 {
  grid-column: span 12;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-4 {
  grid-column: span 4;
}

/* Dashboard Cards inside About */
.stat-card {
  text-align: center;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

[data-theme='dark'] .stat-num {
  color: var(--primary-light);
}

.stat-label {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 1px;
}

/* Section Titles */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 0.5rem;
}

[data-theme='dark'] .section-subtitle {
  color: var(--primary-light);
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-dark);
}

/* Lists styling inside Bento */
.feature-list {
  margin-top: 1.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-light);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Matakuliah Accordion or Grid */
.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.mk-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.mk-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.mk-card h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme='dark'] .mk-card h4 {
  color: var(--primary-light);
}

.mk-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.mk-list li:last-child {
  border-bottom: none;
}

.mk-sks {
  font-weight: 600;
  color: var(--text-dark);
  background: var(--surface-hover);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Dosen Section */
.dosen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.dosen-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  border-bottom: 4px solid var(--primary-color);
  overflow: hidden;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
}

.dosen-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.dosen-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
  border: 3px solid var(--glass-border);
  background: var(--surface-color);
  box-shadow: var(--shadow-sm);
}

.dosen-info {
  padding: 1.25rem 0 0 0;
}

.dosen-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.dosen-title {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
}

[data-theme='dark'] .dosen-title {
  color: var(--primary-light);
}

/* Footer & Institutional Logos */
footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-logos img {
  height: 50px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition);
}

.footer-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--text-muted);
}

.footer-col ul li a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Reveal Animation Class */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .col-span-4,
  .col-span-8,
  .col-span-6,
  .col-span-12 {
    grid-column: span 1 !important;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--surface-color);
    flex-direction: column;
    padding: 2rem;
    transition: 0.3s;
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .btn-group {
    flex-direction: column;
  }
}

/* Header Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-color);
  min-width: 260px;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0;
  z-index: 100;
  list-style: none;
}

.dropdown:hover>.dropdown-menu {
  display: block;
  animation: fadeIn 0.2s ease;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-sans);
}

.dropdown-menu li a::after {
  display: none;
}

.dropdown-menu li a:hover {
  background: var(--surface-hover);
  color: var(--primary-color);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
}

/* Submenu Styles */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu>.dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -5px;
}

.dropdown-submenu:hover>.dropdown-menu {
  display: block;
}

/* Submenu Mobile adjustments */
@media (max-width: 768px) {
  .dropdown-submenu>.dropdown-menu {
    left: 0;
    margin-top: 0;
  }
}

/* Article Content & Table Styling */
.article-content table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: var(--surface-color);
  font-size: 0.95rem;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border-color) !important;
  padding: 0.75rem 1rem !important;
  vertical-align: middle;
  min-width: 180px;
}

.article-content th {
  background-color: var(--surface-hover) !important;
  font-weight: 600;
  color: var(--text-dark);
}

.article-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.article-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  text-align: justify;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Fix Dark Mode Inline Styles from WYSIWYG */
[data-theme='dark'] .article-content p,
[data-theme='dark'] .article-content span,
[data-theme='dark'] .article-content h1,
[data-theme='dark'] .article-content h2,
[data-theme='dark'] .article-content h3,
[data-theme='dark'] .article-content h4,
[data-theme='dark'] .article-content h5,
[data-theme='dark'] .article-content h6,
[data-theme='dark'] .article-content li,
[data-theme='dark'] .article-content td,
[data-theme='dark'] .article-content th,
[data-theme='dark'] .article-content div {
  color: var(--text-dark) !important;
  background-color: transparent !important;
}

[data-theme='dark'] .article-content a {
  color: var(--primary-light) !important;
}

[data-theme='dark'] .article-content th {
  background-color: var(--surface-hover) !important;
}

[data-theme='dark'] .article-content td {
  background-color: transparent !important;
}

[data-theme='dark'] .article-content table {
  background-color: var(--surface-color) !important;
}