/* =============================================
   Henshin Journey CMS - Main Stylesheet
   Theme: Navy Blue, Tech-Travel Aesthetic
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ---- Variables ---- */
:root {
  --navy:       #0d1b2a;
  --navy-deep:  #07111c;
  --navy-mid:   #122236;
  --navy-light: #1a3352;
  --blue:       #1e5fa3;
  --blue-bright:#2d7dd2;
  --blue-neon:  #4fa3e0;
  --accent:     #f4a127;
  --accent2:    #e05c5c;
  --teal:       #1db5be;
  --white:      #f0f4f8;
  --gray-100:   #e2e8f0;
  --gray-200:   #c8d5e3;
  --gray-400:   #7a9ab8;
  --gray-600:   #4a6681;
  --text:       #d0dce8;
  --text-muted: #8aa5be;
  --border:     rgba(74,102,129,0.3);
  --card-bg:    rgba(18,34,54,0.85);
  --glass:      rgba(13,27,42,0.7);
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
  --radius:     12px;
  --radius-lg:  20px;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Inter', sans-serif;
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--navy-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: var(--blue-neon); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---- Background Pattern ---- */
.bg-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(30,95,163,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(29,181,190,0.08) 0%, transparent 40%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
}
.grid-overlay {
  background-image: linear-gradient(rgba(78,163,224,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(78,163,224,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--white);
  line-height: 1.2;
}
.font-mono { font-family: var(--font-mono); }
.text-accent { color: var(--accent); }
.text-blue { color: var(--blue-neon); }
.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }

/* ---- Navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 2rem;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(7,17,28,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
.navbar.scrolled {
  background: rgba(7,17,28,0.98);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700; color: white; font-size: 14px;
  box-shadow: 0 0 20px rgba(45,125,210,0.4);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.15rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--blue-neon); }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem; font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: rgba(30,95,163,0.2);
}
.nav-link.active::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--blue-neon);
  border-radius: 2px;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100%); left: 0;
  min-width: 180px;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: all var(--transition);
}
.dropdown.open .dropdown-menu {
  opacity: 1; pointer-events: all; transform: translateY(0);
}
.dropdown-item {
  display: block; padding: 0.5rem 1rem;
  color: var(--text-muted); font-size: 0.875rem;
  border-radius: 6px;
  transition: all var(--transition);
}
.dropdown-item:hover {
  color: var(--white); background: rgba(30,95,163,0.2);
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.cart-icon {
  position: relative; padding: 0.5rem;
  color: var(--text-muted); font-size: 1.2rem;
  transition: color var(--transition);
}
.cart-icon:hover { color: var(--white); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: #000;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px; transition: all var(--transition);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border: none; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: white;
  box-shadow: 0 4px 15px rgba(30,95,163,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,95,163,0.6);
  color: white;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #e09000);
  color: #000; font-weight: 700;
}
.btn-accent:hover { transform: translateY(-2px); color: #000; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--blue-neon); color: var(--blue-neon);
  background: rgba(30,95,163,0.1);
}
.btn-ghost {
  background: transparent; color: var(--text-muted);
}
.btn-ghost:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.btn-danger {
  background: rgba(224,92,92,0.2); color: var(--accent2);
  border: 1px solid rgba(224,92,92,0.3);
}
.btn-danger:hover { background: rgba(224,92,92,0.3); color: white; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; border-radius: 8px; }

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}
.card:hover {
  border-color: rgba(79,163,224,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-title { font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.5rem; }
.card-excerpt { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.card-meta {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.75rem; color: var(--gray-600); margin-top: 1rem;
  font-family: var(--font-mono);
}

/* Post placeholder */
.card-placeholder .card-img-ph {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(30,95,163,0.2), rgba(29,181,190,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--border);
}
.card-placeholder .card-title-ph {
  height: 16px; background: var(--border); border-radius: 4px; margin-bottom: 8px;
}
.card-placeholder .card-text-ph {
  height: 12px; background: rgba(74,102,129,0.2); border-radius: 4px; margin-bottom: 6px;
}
.card-placeholder .card-text-ph:last-child { width: 70%; }

/* ---- Grid Layouts ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-main { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.grid-products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }

/* ---- Hero Section ---- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 0 4rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem; color: var(--teal);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 40px; height: 1px; background: var(--teal);
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800; line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}
.hero-title .line-blue { color: var(--blue-neon); }
.hero-title .line-accent { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 500px; margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Terminal widget */
.terminal-widget {
  background: var(--navy-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.terminal-bar {
  background: var(--navy-mid);
  padding: 0.5rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.terminal-body { padding: 1rem; }
.terminal-line { margin-bottom: 0.25rem; }
.terminal-line .prompt { color: var(--teal); }
.terminal-line .cmd { color: var(--blue-neon); }
.terminal-line .out { color: var(--text-muted); }
.terminal-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--blue-neon); animation: blink 1s step-end infinite;
  vertical-align: text-bottom; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* Floating badges */
.float-badge {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 0.6rem 1rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-family: var(--font-mono);
  backdrop-filter: blur(10px);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float-badge-2 { animation-delay: 1s; animation-duration: 3.5s; }
.float-badge-3 { animation-delay: 0.5s; animation-duration: 4s; }

/* Particle dots */
.particles { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.particle {
  position: absolute; border-radius: 50%;
  background: var(--blue-neon); opacity: 0.15;
  animation: drift linear infinite;
}
@keyframes drift {
  from { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  to { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ---- Sections ---- */
.section { padding: 5rem 0; }
.section-header { margin-bottom: 3rem; }
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-sub { color: var(--text-muted); }
.section-divider {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 2px; margin-top: 0.75rem;
}

/* ---- Post Page ---- */
.post-hero {
  padding: 120px 0 4rem;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
}
.post-title { font-size: clamp(1.8rem, 4vw, 3rem); }
.post-meta { display: flex; gap: 1.5rem; color: var(--text-muted); font-size: 0.85rem; margin-top: 1rem; }
.post-meta-item { display: flex; align-items: center; gap: 0.4rem; }
.post-thumbnail { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2.5rem; }
.post-thumbnail img { width: 100%; max-height: 480px; object-fit: cover; }
.post-content {
  font-size: 1rem; line-height: 1.9;
  color: var(--text);
}
.post-content h2, .post-content h3 { margin: 2rem 0 1rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--blue-neon);
  padding: 1rem 1.5rem; margin: 1.5rem 0;
  background: rgba(30,95,163,0.1); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted); font-style: italic;
}
.post-content code {
  background: var(--navy-mid); padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.85em; color: var(--teal);
}
.post-content pre {
  background: var(--navy-deep); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; overflow-x: auto;
}
.post-content pre code { background: none; padding: 0; }

/* ---- Sidebar ---- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.sidebar-title {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  color: var(--white); margin-bottom: 1rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem;
}

/* ---- Shop ---- */
.product-card { cursor: pointer; }
.product-card .product-img {
  aspect-ratio: 1; object-fit: cover; width: 100%;
  transition: transform var(--transition);
}
.product-card:hover .product-img { transform: scale(1.05); }
.product-img-wrap { overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.product-price { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); font-weight: 700; }
.product-sale {
  text-decoration: line-through; color: var(--text-muted);
  font-size: 0.75rem;
}
.product-name { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.product-stock {
  font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem;
}
.product-img-ph {
  aspect-ratio: 1; width: 100%;
  background: linear-gradient(135deg, rgba(30,95,163,0.15), rgba(29,181,190,0.08));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--border);
}

/* ---- Pagination ---- */
.pagination {
  display: flex; gap: 0.5rem; justify-content: center; margin-top: 3rem;
}
.page-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted); font-size: 0.875rem;
  transition: all var(--transition); cursor: pointer;
}
.page-btn:hover, .page-btn.active {
  border-color: var(--blue-neon); color: var(--blue-neon);
  background: rgba(30,95,163,0.1);
}

/* ---- Tags ---- */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(30,95,163,0.15);
  border: 1px solid rgba(30,95,163,0.3);
  border-radius: 20px;
  font-size: 0.7rem; font-family: var(--font-mono);
  color: var(--blue-neon);
}
.tag-accent { background: rgba(244,161,39,0.15); border-color: rgba(244,161,39,0.3); color: var(--accent); }
.tag-teal { background: rgba(29,181,190,0.15); border-color: rgba(29,181,190,0.3); color: var(--teal); }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.form-control {
  width: 100%; padding: 0.7rem 1rem;
  background: rgba(18,34,54,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white); font-family: var(--font-body); font-size: 0.9rem;
  transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--blue-neon);
  box-shadow: 0 0 0 3px rgba(79,163,224,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a9ab8' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 2rem;
}
textarea.form-control { min-height: 120px; resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 0.75rem; color: var(--accent2); margin-top: 0.3rem; }

/* ---- Alerts ---- */
.alert {
  padding: 0.85rem 1.25rem; border-radius: var(--radius);
  font-size: 0.875rem; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.alert-success { background: rgba(39,201,63,0.1); border: 1px solid rgba(39,201,63,0.3); color: #27c93f; }
.alert-error { background: rgba(224,92,92,0.1); border: 1px solid rgba(224,92,92,0.3); color: var(--accent2); }
.alert-info { background: rgba(79,163,224,0.1); border: 1px solid rgba(79,163,224,0.3); color: var(--blue-neon); }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-admin { background: rgba(244,161,39,0.15); color: var(--accent); }
.badge-author { background: rgba(79,163,224,0.15); color: var(--blue-neon); }
.badge-subscriber { background: rgba(29,181,190,0.15); color: var(--teal); }
.badge-published { background: rgba(39,201,63,0.15); color: #27c93f; }
.badge-draft { background: rgba(74,102,129,0.2); color: var(--gray-400); }
.badge-archived { background: rgba(224,92,92,0.15); color: var(--accent2); }

/* ---- Dividers ---- */
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---- Footer ---- */
.footer {
  background: var(--navy-deep);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand-desc { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.75rem; line-height: 1.7; }
.footer-heading { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-400); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-link { color: var(--text-muted); font-size: 0.875rem; transition: color var(--transition); }
.footer-link:hover { color: var(--blue-neon); }
.footer-socials { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 8px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.9rem;
  transition: all var(--transition);
}
.social-btn:hover { border-color: var(--blue-neon); color: var(--blue-neon); background: rgba(30,95,163,0.1); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ---- Utility ---- */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.img-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.opacity-0 { opacity: 0; }
.relative { position: relative; }

/* Alpine.js transitions */
[x-cloak] { display: none !important; }
.fade-enter { opacity: 0; transform: translateY(8px); }
.fade-leave { opacity: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-deep); }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .grid-products { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 900px) {
  .grid-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu {
    position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(7,17,28,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex; flex-direction: column; gap: 0.25rem;
    z-index: 999;
  }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-title { font-size: 2rem; }
  .container { padding: 0 1rem; }
}

/* =========================================
   PROFILE PAGE
========================================= */

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-card{
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,.25);
    transition:.25s ease;
}

.profile-card:hover{
    transform:translateY(-3px);
}

.profile-avatar{
    width:180px;
    height:180px;
    border-radius:50%;
    object-fit:cover;
    border:5px solid var(--accent);
    display:block;
    margin:0 auto;
}

.profile-name{
    font-size:1.6rem;
    font-weight:700;
    margin-top:15px;
    color:var(--white);
}

.profile-role{
    color:var(--accent);
    font-weight:600;
    margin-top:5px;
}

.info-card{
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:20px;
    padding:25px;
    box-shadow:0 10px 30px rgba(0,0,0,.25);
    transition:.25s ease;
}

.info-card:hover{
    transform:translateY(-3px);
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:15px;
    margin-top:20px;
}

.stat-box{
    background:rgba(255,255,255,.03);
    padding:15px;
    border-radius:12px;
    text-align:center;
    border:1px solid rgba(255,255,255,.05);
}

.stat-box h2{
    margin:0;
    color:var(--accent);
    font-size:2rem;
    line-height:1.1;
}

.stat-box small{
    color:var(--text-muted);
    font-size:.85rem;
}

.profile-section{
    margin-top:24px;
}

.profile-table{
    width:100%;
    border-collapse:collapse;
}

.profile-table th{
    padding:14px 12px;
    border-bottom:1px solid var(--border);
    text-align:left;
    color:var(--text-muted);
    font-size:.85rem;
    font-weight:600;
}

.profile-table td{
    padding:14px 12px;
    border-bottom:1px solid var(--border);
    text-align:left;
    vertical-align:middle;
}

.profile-table tbody tr{
    transition:.2s ease;
}

.profile-table tbody tr:hover{
    background:rgba(255,255,255,.03);
}

.profile-info-item{
    margin-bottom:16px;
}

.profile-info-item strong{
    display:block;
    margin-bottom:4px;
    color:var(--white);
}

.profile-info-item span{
    color:var(--text-muted);
}

.profile-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(244,161,39,.15);
    color:var(--accent);
    font-size:.8rem;
    font-weight:600;
}

.profile-empty{
    text-align:center;
    padding:30px;
    color:var(--text-muted);
}

.profile-empty i{
    font-size:2rem;
    margin-bottom:10px;
    display:block;
    opacity:.5;
}

/* =========================================
   ACADEMIC PORTAL (SIAKAD-style)
========================================= */

.academic-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.academic-sidebar {
  position: sticky;
  top: 100px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.academic-sidebar-head {
  padding: 0.6rem 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.academic-sidebar-head .avatar-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
}

.academic-sidebar-head .sidebar-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 0.95rem;
  line-height: 1.3;
  word-break: break-word;
}

.academic-sidebar-head .sidebar-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.academic-menu { display: flex; flex-direction: column; gap: 2px; }

.academic-menu-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-600);
  padding: 0.7rem 0.8rem 0.3rem;
}

.academic-menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.academic-menu-item i { width: 20px; text-align: center; color: var(--gray-400); transition: color var(--transition); }

.academic-menu-item:hover {
  color: var(--white);
  background: rgba(30,95,163,0.15);
}

.academic-menu-item.active {
  color: var(--white);
  background: linear-gradient(135deg, rgba(30,95,163,0.35), rgba(29,181,190,0.15));
  border-color: rgba(79,163,224,0.35);
}

.academic-menu-item.active i { color: var(--blue-neon); }

.academic-sidebar-foot {
  margin-top: 0.9rem;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.academic-content { min-width: 0; }

.academic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

.academic-header h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.25rem; }
.academic-header p { color: var(--text-muted); font-size: 0.9rem; }

.academic-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
  font-family: var(--font-mono);
  margin-bottom: 1.2rem;
}

.academic-breadcrumb a { color: var(--gray-400); }
.academic-breadcrumb a:hover { color: var(--blue-neon); }
.academic-breadcrumb i { font-size: 0.6rem; }

/* Stat cards */
.academic-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.academic-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.academic-stat:hover { transform: translateY(-3px); border-color: rgba(79,163,224,0.4); }

.academic-stat .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-icon-blue { background: rgba(79,163,224,0.15); color: var(--blue-neon); }
.stat-icon-accent { background: rgba(244,161,39,0.15); color: var(--accent); }
.stat-icon-teal { background: rgba(29,181,190,0.15); color: var(--teal); }
.stat-icon-red { background: rgba(224,92,92,0.15); color: var(--accent2); }

.academic-stat .stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
}

.academic-stat .stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* Panels / cards */
.academic-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.academic-panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.academic-panel-title i { color: var(--blue-neon); }

.academic-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.academic-sub-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Tables */
.academic-table-wrap { overflow-x: auto; }

.academic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.academic-table th {
  text-align: left;
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.academic-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(74,102,129,0.2);
  vertical-align: middle;
}

.academic-table tbody tr { transition: background var(--transition); }
.academic-table tbody tr:hover { background: rgba(30,95,163,0.08); }
.academic-table tbody tr:last-child td { border-bottom: none; }

.academic-code {
  font-family: var(--font-mono);
  color: var(--blue-neon);
  font-size: 0.78rem;
  white-space: nowrap;
}

.academic-sks { text-align: center; }
.academic-score { text-align: center; font-family: var(--font-mono); font-weight: 700; }

.grade-pill {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
}

.grade-a { background: rgba(39,201,63,0.15); color: #27c93f; border: 1px solid rgba(39,201,63,0.3); }
.grade-b { background: rgba(79,163,224,0.15); color: var(--blue-neon); border: 1px solid rgba(79,163,224,0.3); }
.grade-c { background: rgba(244,161,39,0.15); color: var(--accent); border: 1px solid rgba(244,161,39,0.3); }
.grade-d { background: rgba(224,92,92,0.15); color: var(--accent2); border: 1px solid rgba(224,92,92,0.3); }
.grade-none { background: rgba(74,102,129,0.2); color: var(--gray-400); border: 1px solid rgba(74,102,129,0.3); }

.pill-ok { background: rgba(39,201,63,0.12); color: #27c93f; border: 1px solid rgba(39,201,63,0.25); }
.pill-warn { background: rgba(244,161,39,0.12); color: var(--accent); border: 1px solid rgba(244,161,39,0.25); }
.pill-muted { background: rgba(74,102,129,0.2); color: var(--gray-400); border: 1px solid rgba(74,102,129,0.3); }

/* Timetable */
.timetable {
  display: grid;
  grid-template-columns: 110px repeat(6, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.78rem;
}

.timetable-head,
.timetable-day {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.timetable-head {
  background: var(--navy-mid);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.timetable-day {
  background: rgba(13,27,42,0.5);
  font-family: var(--font-mono);
  color: var(--gray-400);
  text-align: center;
}

.timetable-cell {
  min-height: 96px;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(74,102,129,0.2);
  border-right: 1px solid rgba(74,102,129,0.2);
}

.timetable-cell .tt-code {
  font-family: var(--font-mono);
  color: var(--blue-neon);
  font-weight: 700;
  font-size: 0.75rem;
}

.timetable-cell .tt-name { color: var(--white); font-weight: 600; margin: 0.15rem 0; line-height: 1.3; }

.timetable-cell .tt-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tt-empty {
  background: rgba(13,27,42,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 0.68rem;
}

/* Assignment cards */
.assignment-list { display: flex; flex-direction: column; gap: 14px; }

.assignment-card {
  background: rgba(18,34,54,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color var(--transition);
}

.assignment-card:hover { border-color: rgba(79,163,224,0.35); }

.assignment-card .as-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assignment-card .as-title { font-weight: 700; color: var(--white); font-size: 0.95rem; margin: 0.2rem 0 0.35rem; }
.assignment-card .as-desc { color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }
.assignment-card .as-meta { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 0.7rem; font-size: 0.75rem; color: var(--gray-400); }
.assignment-card .as-meta i { margin-right: 4px; color: var(--blue-neon); }

.as-due-overdue { color: var(--accent2) !important; }
.as-due-soon { color: var(--accent) !important; }

/* Student profile within academic portal */
.academic-profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }

.academic-profile-grid .profile-card { margin-bottom: 0; }

.info-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid rgba(74,102,129,0.2); font-size: 0.85rem; }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-muted); flex-shrink: 0; }
.info-row .v { color: var(--white); font-weight: 600; text-align: right; }

.ips-ipk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Empty state */
.academic-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.academic-empty i { font-size: 2.4rem; display: block; margin-bottom: 0.8rem; opacity: 0.4; color: var(--blue-neon); }
.academic-empty p { font-size: 0.9rem; }

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width:768px){

    .profile-grid{
        grid-template-columns:1fr;
    }

    .stats-grid{
        grid-template-columns:1fr;
    }

    .profile-avatar{
        width:140px;
        height:140px;
    }

    .profile-table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }

    .profile-card,
    .info-card{
        padding:20px;
    }

    .academic-layout,
    .academic-profile-grid{
        grid-template-columns:1fr;
    }

    .academic-sidebar{
        position:static;
    }

    .academic-stats{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
    }

    .academic-stat .stat-value{
        font-size:1.25rem;
    }

    .academic-stat .stat-icon{
        width:40px;
        height:40px;
        font-size:1rem;
    }

    .ips-ipk-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width:520px){
    .academic-stats{
        grid-template-columns:1fr;
    }
}