/* ================================================================
   DESIGN SYSTEM - Hernan Albano Personal Site
   Single source of truth for all design tokens and components
   ================================================================ */

/* ----------------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------------- */
:root {
  /* Colors - Dark Theme */
  --color-bg: #0a0a0b;
  --color-surface: #141416;
  --color-surface-hover: #1c1c1f;
  --color-border: #2a2a2e;
  --color-text: #f5f5f7;
  --color-text-muted: #8a8a8e;
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md: 1.0625rem;    /* 17px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 2rem;        /* 32px */
  --text-4xl: 2.5rem;      /* 40px */
  --text-5xl: 3rem;        /* 48px */

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* Spacing Scale */
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.5rem;       /* 24px */
  --space-6: 2rem;         /* 32px */
  --space-8: 3rem;         /* 48px */
  --space-10: 4rem;        /* 64px */
  --space-12: 5rem;        /* 80px */

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

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

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ----------------------------------------------------------------
   2. RESET & BASE STYLES
   ---------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

/* ----------------------------------------------------------------
   3. TYPOGRAPHY
   ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  margin: 0;
}

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

p {
  margin: 0 0 var(--space-4);
}

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

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

code, pre {
  font-family: var(--font-mono);
}

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

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

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

/* ----------------------------------------------------------------
   4. LAYOUT COMPONENTS
   ---------------------------------------------------------------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-10) 0;
}

.section-lg {
  padding: var(--space-12) 0;
}

/* ----------------------------------------------------------------
   5. CARD COMPONENTS
   ---------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-slow), transform var(--transition-slow);
}

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

.card-header {
  margin-bottom: var(--space-5);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

/* ----------------------------------------------------------------
   6. BUTTON COMPONENTS
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-lg);
}

/* ----------------------------------------------------------------
   7. HEADER/NAVIGATION
   ---------------------------------------------------------------- */
.site-header {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(10px);
  z-index: var(--z-sticky);
}

.nav-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.nav-link:hover {
  color: var(--color-text);
}

/* ----------------------------------------------------------------
   8. TIMELINE COMPONENT
   ---------------------------------------------------------------- */
.timeline {
  display: grid;
  gap: var(--space-6);
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
}

.timeline-marker {
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
  position: relative;
}

.timeline-marker::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + var(--space-6));
  background: var(--color-border);
}

.timeline-item:last-child .timeline-marker::after {
  display: none;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  display: block;
}

.timeline-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

.timeline-company {
  font-size: var(--text-base);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.timeline-description {
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.timeline-bullets {
  list-style: none;
  padding: 0;
}

.timeline-bullets li {
  padding-left: var(--space-5);
  position: relative;
  margin-bottom: var(--space-2);
}

.timeline-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ----------------------------------------------------------------
   9. GRID COMPONENTS
   ---------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ----------------------------------------------------------------
   10. UTILITIES
   ---------------------------------------------------------------- */
.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

/* ----------------------------------------------------------------
   11. PROFILE IMAGE
   ---------------------------------------------------------------- */
.profile-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.profile-image {
  width: 184px;
  height: 184px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  object-fit: cover;
}

@media (max-width: 640px) {
  .profile-image {
    width: 138px;
    height: 138px;
  }
}

/* ----------------------------------------------------------------
   12. ANIMATIONS
   ---------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* ----------------------------------------------------------------
   13. RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
  }

  .container,
  .container-wide {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-8) 0;
  }

  .section-lg {
    padding: var(--space-10) 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .timeline-marker {
    display: none;
  }
}
