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

:root {
  /* Colors */
  --bg-primary: #080b11;
  --bg-secondary: #0f1524;
  --accent: #1e6ffd;
  --accent-glow: rgba(30, 111, 253, 0.4);
  --accent-light: #60a5fa;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(30, 111, 253, 0.25);
  
  --glass-bg: rgba(10, 15, 28, 0.65);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-blur: 16px;
  
  /* Status Colors */
  --color-destacado: #3b82f6;
  --color-nuevo: #a855f7;
  --color-popular: #10b981;
  --color-recomendado: #f59e0b;
  
  /* Fonts */
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transition */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Glassmorphism panel helper */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Glowing text and lines */
.glow-text {
  text-shadow: 0 0 12px var(--accent-glow);
}

.glow-border {
  box-shadow: 0 0 15px var(--border-glow);
}

/* Base button animations */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0b4fc7);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(30, 111, 253, 0.3);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 111, 253, 0.5);
  background: linear-gradient(135deg, #3b82f6, var(--accent));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Page transitions container */
.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Navigation Header Styles */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(8, 11, 17, 0.9) 0%, rgba(8, 11, 17, 0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
  background: rgba(8, 11, 17, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 111, 253, 0.1);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 18px;
  color: var(--accent-light);
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.btn-icon-img {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  display: inline-block;
}

.menu-icon-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

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

.logo-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.logo-subtitle {
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.main-nav {
  display: flex;
  gap: 30px;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px rgba(30, 111, 253, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.profile-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-welcome {
  font-size: 9px;
  color: var(--text-secondary);
}

.profile-name {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
}

/* Detail Popup Modal */
.project-detail-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  width: 90%;
  max-width: 800px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-detail-modal[open] {
  display: flex;
}

.project-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-detail-cat {
  font-size: 9px;
  color: var(--accent-light);
  letter-spacing: 0.1em;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.project-modal-header h2 {
  font-size: 16px;
  color: white;
  line-height: 1.3;
}

.modal-author-row {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.project-modal-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.project-media-showcase {
  width: 100%;
  aspect-ratio: 1.4;
  border-radius: 8px;
  overflow: hidden;
  background: #090c15;
  border: 1px solid rgba(255,255,255,0.06);
}

.project-media-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-description-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-description-panel h3 {
  font-size: 12px;
  color: white;
}

.project-description-panel p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-meta-details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

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

.meta-value {
  color: white;
  font-weight: 500;
}

.action-buttons-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: red;
  color: white;
  font-size: 8px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Global Search Modal Styles */
.global-search-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.global-search-backdrop.search-open {
  opacity: 1;
  pointer-events: auto;
}

.global-search-container {
  width: 90%;
  max-width: 600px;
  background: #0a0f1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform var(--transition-smooth);
}

.global-search-backdrop.search-open .global-search-container {
  transform: translateY(0);
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
}

.search-modal-header input {
  flex: 1;
  background: none;
  border: none;
  color: white;
  font-size: 13px;
  font-family: var(--font-body);
}

.search-modal-header input:focus {
  outline: none;
}

.search-modal-close {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: white;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-modal-close:hover {
  background: rgba(255,255,255,0.08);
}

.search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 11px;
}

.search-result-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-section h4 {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: rgba(30, 111, 253, 0.08);
  border-color: rgba(30, 111, 253, 0.2);
}

.search-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-item-icon-wrapper {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.search-item-info {
  flex: 1;
}

.search-item-info h5 {
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.search-item-info p {
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.search-item-badge {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-light);
}

/* Direct Work Display Mode */
.project-detail-modal.direct-mode {
  max-width: 95vw !important;
  width: 95vw !important;
  height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px !important;
}

.project-detail-modal.direct-mode .project-modal-header {
  padding: 8px 16px 12px 16px !important;
}

.project-detail-modal.direct-mode .project-modal-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  padding: 0 16px 16px 16px !important;
  gap: 0 !important;
  height: calc(100% - 60px) !important;
}

.project-detail-modal.direct-mode .project-media-showcase {
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
}

.project-detail-modal.direct-mode .project-description-panel {
  display: none !important;
}

/* Work Cards Grid Hover Effects */
.work-grid-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent) !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
  background: rgba(255, 255, 255, 0.04) !important;
}
.work-grid-card:hover .card-img {
  transform: scale(1.05);
}

/* Responsive Header Adjustments to Prevent Overlap */
@media (max-width: 1024px) {
  .main-header {
    padding: 0 20px;
  }
  .main-nav {
    gap: 15px;
  }
  .profile-info {
    display: none !important;
  }
  .profile-widget {
    padding-left: 0;
    border-left: none;
  }
}

@media (max-width: 820px) {
  .main-nav {
    gap: 10px;
  }
  .main-nav a {
    font-size: 11px;
    letter-spacing: 0.05em;
  }
  .header-actions {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .logo-text {
    display: none !important;
  }
}

/* User Profile Dropdown Menu */
.profile-widget {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  background: rgba(20, 16, 50, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  padding: 8px 0;
  z-index: 1100;
  transform-origin: top right;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-dropdown-menu.show {
  display: flex;
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-decoration: none;
  font-family: var(--font-body);
  transition: all 0.25s ease;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}
.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-light);
}
.profile-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 6px 0;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.close-modal:hover {
  color: white !important;
}
