/**
 * Font Loader - Custom Fonts
 * 
 * @author Mustafa Erdinç - mustafaerdinc@me.com +905425786040
 * @version 1.0.0
 * @since 2024
 */

/* ============================================================================
   FONT FACE DECLARATIONS
   ============================================================================ */

/* Adobe Text Pro - Serif Font for Headings & Brand */
@font-face {
  font-family: 'Adobe Text Pro';
  src: url('../fonts/AdobeTextPro.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Adobe Text Pro';
  src: url('../fonts/AdobeTextPro.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Adobe Text Pro';
  src: url('../fonts/AdobeTextPro.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Untitled Sans - Sans-serif Font for UI & Body */
@font-face {
  font-family: 'Untitled Sans';
  src: url('../fonts/UntitledSans.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Untitled Sans';
  src: url('../fonts/UntitledSans.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Untitled Sans';
  src: url('../fonts/UntitledSans.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Untitled Sans';
  src: url('../fonts/UntitledSans.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Sohne Mono - Monospace Font for Numbers & Code */
@font-face {
  font-family: 'Sohne Mono';
  src: url('../fonts/SohneMono.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sohne Mono';
  src: url('../fonts/SohneMono.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ============================================================================
   FONT VARIABLES & FALLBACKS
   ============================================================================ */

:root {
  /* Font Families */
  --font-serif: 'Adobe Text Pro', Georgia, 'Times New Roman', serif;
  --font-sans: 'Untitled Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Sohne Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Font Sizes */
  --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 */
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
}

/* ============================================================================
   BASE TYPOGRAPHY
   ============================================================================ */

/* Base body text */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================================================
   HEADING HIERARCHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 0.5em;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* ============================================================================
   NAVIGATION TYPOGRAPHY
   ============================================================================ */

.navbar-brand {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.nav-link {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

/* ============================================================================
   UI ELEMENTS TYPOGRAPHY
   ============================================================================ */

.btn {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-normal);
}

.form-control, .form-select {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
}

.card-title {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-semibold);
}

.badge {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-xs);
}

/* ============================================================================
   NUMBERS & TECHNICAL CONTENT
   ============================================================================ */

.stat-number, .progress-label, .table .font-mono {
  font-family: var(--font-mono);
  font-weight: var(--font-weight-semibold);
}

/* ============================================================================
   FOOTER TYPOGRAPHY
   ============================================================================ */

.footer {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.font-serif { font-family: var(--font-serif) !important; }
.font-sans { font-family: var(--font-sans) !important; }
.font-mono { font-family: var(--font-mono) !important; }

.fw-normal { font-weight: var(--font-weight-normal) !important; }
.fw-medium { font-weight: var(--font-weight-medium) !important; }
.fw-semibold { font-weight: var(--font-weight-semibold) !important; }
.fw-bold { font-weight: var(--font-weight-bold) !important; }

.fs-xs { font-size: var(--font-size-xs) !important; }
.fs-sm { font-size: var(--font-size-sm) !important; }
.fs-base { font-size: var(--font-size-base) !important; }
.fs-lg { font-size: var(--font-size-lg) !important; }
.fs-xl { font-size: var(--font-size-xl) !important; }
.fs-2xl { font-size: var(--font-size-2xl) !important; }
.fs-3xl { font-size: var(--font-size-3xl) !important; }
.fs-4xl { font-size: var(--font-size-4xl) !important; }
.fs-5xl { font-size: var(--font-size-5xl) !important; }

.lh-tight { line-height: var(--line-height-tight) !important; }
.lh-normal { line-height: var(--line-height-normal) !important; }
.lh-relaxed { line-height: var(--line-height-relaxed) !important; }

.ls-tight { letter-spacing: var(--letter-spacing-tight) !important; }
.ls-normal { letter-spacing: var(--letter-spacing-normal) !important; }
.ls-wide { letter-spacing: var(--letter-spacing-wide) !important; }

/* ============================================================================
   DARK MODE ADJUSTMENTS
   ============================================================================ */

[data-theme="dark"] {
  /* Slightly increase font weight for better contrast in dark mode */
  --font-weight-normal: 450;
  --font-weight-medium: 550;
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================ */

/* Font loading fallback */
.fonts-loading {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.fonts-loaded {
  font-family: var(--font-sans);
}

/* ============================================================================
   USER MENU DROPDOWN STYLING
   ============================================================================ */

/* User menu dropdown specific styles */
.dropdown-menu {
  border: 1px solid var(--border-color);
  background: var(--navbar-bg);
  transition: all 0.3s ease;
}

.dropdown-item {
  color: var(--secondary-color);
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 4px;
  padding: 8px 12px;
}

.dropdown-item:hover {
  background-color: rgba(56, 116, 255, 0.1);
  color: var(--primary-color);
  transform: translateX(2px);
}

/* Logout button styling within dropdown */
.dropdown-menu .btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background-color: #6c757d;
  color: white;
}

.dropdown-menu .btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dropdown-divider {
  margin: 8px 12px;
  border-color: var(--border-color);
}

/* Footer links in dropdown */
.dropdown-menu .border-top {
  border-color: var(--border-color) !important;
}

.dropdown-menu .border-top a {
  color: var(--secondary-color);
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.dropdown-menu .border-top a:hover {
  color: var(--primary-color);
} 