/* Universal Portfolio Template Standardization */
/* This CSS ensures all portfolio templates have consistent styling */

/* CSS Variables for consistent sizing */
:root {
  /* Font Sizes - Consistent across all templates */
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-lg: 1.125rem;
  /* 18px */
  --font-size-xl: 1.25rem;
  /* 20px */
  --font-size-2xl: 1.5rem;
  /* 24px */
  --font-size-3xl: 1.875rem;
  /* 30px */
  --font-size-4xl: 2.25rem;
  /* 36px */
  --font-size-5xl: 3rem;
  /* 48px */
  --font-size-6xl: 3.75rem;
  /* 60px */

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing - Consistent margins and padding */
  --spacing-xs: 0.25rem;
  /* 4px */
  --spacing-sm: 0.5rem;
  /* 8px */
  --spacing-md: 1rem;
  /* 16px */
  --spacing-lg: 1.5rem;
  /* 24px */
  --spacing-xl: 2rem;
  /* 32px */
  --spacing-2xl: 3rem;
  /* 48px */
  --spacing-3xl: 4rem;
  /* 64px */

  /* Heights - Standardized component heights */
  --header-height: 80px;
  --card-height: 300px;
  --button-height: 48px;
  --input-height: 44px;
  --section-padding: 6rem;
  --form-height: 50px;
  --table-row-height: 60px;

  /* Widths - Standardized component widths */
  --container-max-width: 1200px;
  --card-min-width: 300px;
  --button-min-width: 120px;
  --form-max-width: 600px;
  --sidebar-width: 280px;

  /* Border Radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Colors - Universal color scheme */
  --primary: #6d28d9;
  --primary-light: #8b5cf6;
  --primary-dark: #5b21b6;
  --secondary: #ec4899;
  --accent: #10b981;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --dark: #1f2937;
  --light: #f9fafb;
  --gray: #6b7280;
  --gray-light: #d1d5db;
  --border: #e5e7eb;
  --text: #374151;
  --text-light: #6b7280;
}

/* Global Reset and Base Styles */
* {
  margin: 0;
  padding: 5;
  box-sizing: border-box;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', 'Lato', 'Arial', sans-serif;
  line-height: var(--line-height-relaxed);
  overflow-x: hidden;
  color: var(--text);
  background-color: var(--light);
}

/* Typography - Universal heading styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-md);
  color: var(--dark);
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xs);
}

h6 {
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-xs);
}

/* Paragraph and text elements */
p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-md);
  color: var(--text);
}

/* Links */
a {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  text-decoration: none;
  transition: all 0.3s ease;
  color: var(--primary);
}

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

/* Buttons - Standardized button styles */
button,
.btn {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  height: var(--button-height);
  min-width: var(--button-min-width);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

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

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-warning {
  background-color: var(--warning);
  color: white;
}

.btn-error {
  background-color: var(--error);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

/* Form elements */
input,
textarea,
select {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  height: var(--input-height);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  width: 100%;
  background-color: white;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-xs);
  display: block;
  color: var(--dark);
}

/* Form containers */
.form-container {
  max-width: var(--form-max-width);
  margin: 0 auto;
  padding: var(--spacing-xl);
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

/* Header - Standardized header */
header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.logo {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-2xl);
  letter-spacing: 1px;
  color: var(--primary);
}

/* Navigation */
nav ul {
  display: flex;
  gap: var(--spacing-xl);
  list-style: none;
}

nav ul li a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--spacing-sm) 0;
  transition: all 0.3s ease;
  color: var(--text);
}

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

/* Container - Standardized container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Sections - Standardized section spacing */
section {
  padding: var(--section-padding) 0;
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  color: var(--dark);
}

/* Cards - Standardized card styles */
.card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  transition: all 0.3s ease;
  min-height: var(--card-height);
}

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

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--dark);
}

.card-content {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--text);
}

/* Tables - Standardized table styles */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

th,
td {
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: var(--font-size-base);
}

th {
  background-color: var(--light);
  font-weight: var(--font-weight-semibold);
  color: var(--dark);
  height: var(--table-row-height);
}

td {
  height: var(--table-row-height);
  color: var(--text);
}

tr:hover {
  background-color: var(--light);
}

/* Sidebar - Standardized sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: white;
  border-right: 1px solid var(--border);
  padding: var(--spacing-lg);
  overflow-y: auto;
  z-index: 100;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: var(--spacing-sm);
}

.sidebar-nav a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  transition: all 0.3s ease;
  color: var(--text);
  font-size: var(--font-size-base);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: var(--primary);
  color: white;
}

/* Dashboard styles */
.dashboard {
  margin-left: var(--sidebar-width);
  padding: var(--spacing-xl);
}

.dashboard-header {
  margin-bottom: var(--spacing-2xl);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

.stat-card {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.stat-number {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

.stat-label {
  font-size: var(--font-size-base);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Alert messages */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-base);
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  width: 90%;
  /* Allow container to expand with content */
}

/* Utility classes */
.text-sm {
  font-size: var(--font-size-sm);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-2xl {
  font-size: var(--font-size-2xl);
}

.text-3xl {
  font-size: var(--font-size-3xl);
}

.text-4xl {
  font-size: var(--font-size-4xl);
}

.font-light {
  font-weight: var(--font-weight-light);
}

.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.mb-xs {
  margin-bottom: var(--spacing-xs);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.p-xs {
  padding: var(--spacing-xs);
}

.p-sm {
  padding: var(--spacing-sm);
}

.p-md {
  padding: var(--spacing-md);
}

.p-lg {
  padding: var(--spacing-lg);
}

.p-xl {
  padding: var(--spacing-xl);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

/* Responsive design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: var(--font-size-5xl);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .card-title {
    font-size: var(--font-size-lg);
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .dashboard {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem;
    --header-height: 70px;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  .card-title {
    font-size: var(--font-size-base);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  nav ul {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 3rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .section-title {
    font-size: var(--font-size-lg);
  }

  .card {
    padding: var(--spacing-lg);
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .form-container {
    padding: var(--spacing-lg);
  }
}