/* ==========================================================
   E-PORTOFOLIO PPG - MODERN DESIGN SYSTEM
   Author: Kadek Angga Arijaya Kusuma (Informatika - UNDIKSHA)
   ========================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(226, 232, 240, 0.8);
  --border-subtle: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.15);

  --accent-cyan: #06b6d4;
  --emerald: #10b981;
  --emerald-bg: #ecfdf5;
  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --rose: #f43f5e;
  --rose-bg: #fff1f2;
  --teal: #0d9488;
  --teal-bg: #f0fdfa;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

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

[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.82);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-subtle: #1e293b;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);
  --primary-glow: rgba(59, 130, 246, 0.25);

  --emerald-bg: rgba(16, 185, 129, 0.15);
  --purple-bg: rgba(139, 92, 246, 0.15);
  --amber-bg: rgba(245, 158, 11, 0.15);
  --rose-bg: rgba(244, 63, 94, 0.15);
  --teal-bg: rgba(13, 148, 136, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

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

a:hover {
  color: var(--primary-hover);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-bold {
  font-weight: 700;
}

.text-accent {
  color: var(--primary) !important;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.875rem;
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan), var(--emerald));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

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

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ==========================================================
   HEADER & NAVBAR
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
}

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

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-item {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

[data-theme="light"] .sun-icon {
  display: none;
}
[data-theme="light"] .moon-icon {
  display: block;
}
[data-theme="dark"] .sun-icon {
  display: block;
}
[data-theme="dark"] .moon-icon {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ==========================================================
   HERO SECTION & PROFILE
   ========================================================== */
.hero-section {
  position: relative;
  padding: 3.5rem 0 2rem;
  overflow: hidden;
}

.hero-background-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  line-height: 1.15;
}

.text-gradient {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 840px;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* Profile Card */
.profile-card {
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

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

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.status-indicator {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--emerald);
  border: 3px solid var(--bg-surface);
}

.profile-details {
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tag-status {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem 1.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.meta-val {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
}

.editable-hint {
  border-bottom: 1px dashed var(--text-muted);
  cursor: help;
}

/* Callout Box */
.callout-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-size: 0.9rem;
}

.callout-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content {
  flex: 1;
  color: var(--text-primary);
}

.callout-content p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.callout-content code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

[data-theme="dark"] .callout-content code {
  background: rgba(255, 255, 255, 0.1);
}

/* Tracker Bar & Search */
.tracker-bar {
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tracker-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-num {
  padding: 0.2rem 0.55rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
}

.stat-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  padding: 0.55rem 2rem 0.55rem 2.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  width: 320px;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-clear {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-clear.hidden {
  display: none;
}

/* ==========================================================
   PORTFOLIO COMPONENT SECTIONS
   ========================================================== */
.content-container {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding-bottom: 5rem;
}

.portfolio-section {
  scroll-margin-top: 5rem;
  transition: var(--transition);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.section-number {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.45;
  line-height: 1;
}

.section-title-wrap {
  flex: 1;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.section-title {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 900px;
}

/* Content Card */
.content-card {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-emerald { background: var(--emerald-bg); color: var(--emerald); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-rose { background: var(--rose-bg); color: var(--rose); }
.badge-teal { background: var(--teal-bg); color: var(--teal); }
.badge-subtle { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); }
.badge-light { background: rgba(255, 255, 255, 0.2); color: white; }

/* Data Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th, 
.data-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-glass);
}

.data-table th {
  background: rgba(148, 163, 184, 0.06);
  font-weight: 600;
  color: var(--text-primary);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.04);
}

.compact-table td, 
.compact-table th {
  padding: 0.65rem 0.9rem;
}

/* Analysis Callout Box */
.analysis-box {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin-bottom: 1.5rem;
}

.analysis-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
}

.analysis-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.analysis-list li strong {
  color: var(--text-primary);
}

/* Split Columns */
.split-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.column-box {
  background: rgba(148, 163, 184, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.sub-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.bullet-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Media Showcase Grid */
.media-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.media-item-card {
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  position: relative;
  transition: var(--transition);
}

.media-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.media-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.media-item-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.media-item-card p {
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

.media-metrics {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.metric-tag {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--purple-bg);
  color: var(--purple);
}

/* Video Preview Wrapper */
.video-preview-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: #020617;
  color: white;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  background: #000;
  overflow: hidden;
}

.video-dummy-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
  position: relative;
}

.video-placeholder-overlay {
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.video-play-btn-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--rose);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-play-btn-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.9);
}

.video-placeholder-text h4 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.video-placeholder-text p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.video-meta-bar {
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.video-meta-left {
  display: flex;
  gap: 1.25rem;
  color: #cbd5e1;
}

/* Activities Grid (Non-teaching) */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.activity-card {
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.activity-card:hover {
  transform: translateY(-2px);
  border-color: var(--amber);
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.act-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--amber-bg);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-card h4 {
  font-size: 1rem;
}

.activity-card p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.act-tag {
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px dashed var(--border-glass);
  padding-top: 0.5rem;
}

/* ==========================================================
   RESOURCE & DRIVE ACTION CARD
   ========================================================== */
.resource-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.resource-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 320px;
  min-width: 0;
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gdrive-icon {
  background: #e8f0fe;
  color: #1a73e8;
}

[data-theme="dark"] .gdrive-icon {
  background: rgba(26, 115, 232, 0.2);
  color: #8ab4f8;
}

.youtube-icon {
  background: #fee2e2;
  color: #ef4444;
}

[data-theme="dark"] .youtube-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.resource-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.resource-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.resource-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-left: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-youtube {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.btn-youtube:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.code-link {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ==========================================================
   MODAL PREVIEW
   ========================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  width: 100%;
  max-width: 960px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-backdrop.show .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--primary);
}

.modal-title {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  flex: 1;
  position: relative;
  background: #000;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-footer {
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface-elevated);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.footer-brand h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.footer-copyright {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ==========================================================
   RESPONSIVE LAYOUT
   ========================================================== */
@media (max-width: 992px) {
  .split-columns {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    padding: 1.25rem 1.5rem;
    gap: 0.4rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-glass);
    border-top: none;
  }

  .nav-links.open .nav-item {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.925rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-name-row {
    justify-content: center;
  }

  .meta-label {
    justify-content: center;
  }

  .resource-action-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .resource-btn-group {
    width: 100%;
    justify-content: flex-start;
  }

  .search-box input {
    width: 100%;
  }

  .tracker-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================
   PRINT STYLES (PDF & CETAK PORTOFOLIO)
   ========================================================== */
@media print {
  .print-hide,
  .site-header,
  .scroll-progress-bar,
  .modal-backdrop,
  .resource-btn-group button,
  .btn-ghost {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .glass-panel {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  .portfolio-section {
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  .hero-background-glow {
    display: none;
  }
}
