/* Modern CSS for Gustavo Oliver's Personal Website
 * A professional design for an experienced tech engineer
 */

:root {
  /* Color Palette */
  --primary-color: #2c3e50;      /* Dark blue-gray for primary elements */
  --secondary-color: #3498db;    /* Bright blue for accents and highlights */
  --tertiary-color: #ff69b4;     /* Light pink for secondary accents */
  --text-color: #333333;         /* Dark gray for main text */
  --light-text: #7f8c8d;         /* Light gray for secondary text */
  --background-color: #ffffff;   /* White background */
  --light-bg: #f8f9fa;           /* Light gray background for sections */
  --code-bg: #f6f8fa;            /* Light background for code blocks */
  --border-color: #e9ecef;       /* Light gray for borders */
  --success-color: #2ecc71;      /* Green for success messages */
  --warning-color: #f39c12;      /* Orange for warnings */
  --danger-color: #e74c3c;       /* Red for errors */
  
  /* Typography */
  --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --code-font: 'JetBrains Mono', 'Fira Code', 'Roboto Mono', 'Courier New', monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  
  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  
  /* Box Shadow */
  --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);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* Base Styles */
body {
  font-family: var(--body-font);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  font-size: 16px;
  overflow-y: scroll;
}

h1, h2, h3, h4, h5{
  font-family: var(--heading-font);
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

h6 {
  font-family: var(--heading-font);
  font-weight: 600;
  color: var(--secondary-color);
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--tertiary-color);
  text-decoration: none;
}

/* Container */
.container {
  max-width: 1280px;
  padding: 0 var(--spacing-lg);
}

/* Header & Navigation */
header {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--spacing-lg);
}

.masthead-brand a {
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: -0.5px;
  transition: color 0.2s ease-in-out;
}

.masthead-brand a:hover {
  color: var(--secondary-color);
}

nav a {
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md) !important;
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease-in-out;
}

nav a:hover {
  background-color: var(--light-bg);
}

/* Profile Section */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--background-color);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  margin-bottom: var(--spacing-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Content Sections */
.section {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: linear-gradient(135deg, var(--background-color) 0%, rgba(248, 249, 250, 0.3) 100%);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.section-title {
  position: relative;
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.5px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

/* Blog Post Cards */
.post-card {
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.post-card h4 {
  margin-top: 0;
}

.post-card .date {
  font-size: 0.9rem;
  color: var(--light-text);
  margin-bottom: var(--spacing-md);
  display: block;
}

/* Resume Styles */
.resume-header {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

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

.resume-section-title {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  font-weight: 600;
}

.job-title {
  font-weight: 600;
  color: var(--primary-color);
  word-wrap: break-word;
}

.job-company {
  font-weight: 700;
}

.job-date, .job-location {
  color: var(--light-text);
  font-style: italic;
}

.resume-list {
  padding-left: 1.5rem;
}

.resume-list li {
  margin-bottom: var(--spacing-sm);
}

/* Code Blocks */
pre {
  background-color: var(--code-bg);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

code {
  font-family: var(--code-font);
  font-size: 0.9rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-lg) 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

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

th, td {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
}

tbody tr:nth-child(even) {
  background-color: var(--light-bg);
}

/* D3 Visualization Enhancements */
.viz {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md);
  background-color: var(--light-bg);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

rect:hover {
  fill: var(--secondary-color);
}

path.link {
  stroke: var(--light-text);
  stroke-width: 0.5px;
}

circle {
  stroke: var(--background-color);
  stroke-width: 1.5px;
}

/* Footer styling */
.footer, footer {
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  background-color: var(--background-color);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer a, footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed) ease-in-out;
}

.footer a:hover, footer a:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .profile-image {
    width: 150px;
    height: 150px;
  }
}

/* Timeline Styles */
#timeline-container {
  margin: var(--spacing-xl) 0;
  display: flex;
  justify-content: center;
}

.timeline-item {
  transition: all 0.3s ease;
}

.timeline-point {
  transition: all 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.timeline-point:hover {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.timeline-year {
  font-family: var(--heading-font);
}

.timeline-title {
  font-family: var(--heading-font);
}

.timeline-title a {
  color: var(--secondary-color);
  text-decoration: none;
}

.timeline-title a:hover {
  color: var(--tertiary-color);
  text-decoration: underline;
}

.timeline-description {
  font-family: var(--body-font);
}

.timeline-description a {
  color: var(--secondary-color);
  text-decoration: none;
}

.timeline-description a:hover {
  color: var(--tertiary-color);
  text-decoration: underline;
}

.timeline-tools {
  font-family: var(--body-font);
}

.timeline-tools strong {
  color: var(--text-color);
  font-weight: 600;
}

.timeline-focus {
  font-family: var(--body-font);
}

.timeline-focus strong {
  color: var(--text-color);
  font-weight: 600;
}

.timeline-connector {
  transition: all 0.2s ease;
}

.timeline-tooltip {
  pointer-events: none;
  font-family: var(--body-font);
  line-height: 1.4;
  color: var(--text-color);
}

/* Responsive timeline adjustments */
@media (max-width: 768px) {
  #timeline-container svg {
    width: 100%;
    height: auto;
  }
  
  .timeline-year {
    font-size: 16px;
  }
  
  .timeline-title {
    font-size: 14px;
  }
  
  .timeline-description {
    font-size: 12px;
  }
}

/* Index page specific compact styling */
body.index-page .profile-section {
  margin-bottom: var(--spacing-md);
}

body.index-page .section {
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
}

body.index-page h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
}

body.index-page .section-title {
  margin-bottom: var(--spacing-md);
  margin-top: 0;
  font-size: 1.75rem;
  font-weight: 600;
}

body.index-page .section-title::after {
  display: none;
}

body.index-page p {
  margin-bottom: var(--spacing-sm);
}

body.index-page .footer, body.index-page footer {
  margin-top: var(--spacing-sm);
}

/* Quote/emphasis styling for breaking up text */
.about-emphasis {
  font-style: italic;
  color: var(--primary-color);
  position: relative;
  padding-left: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  border-left: 3px solid var(--tertiary-color);
  background-color: rgba(255, 105, 180, 0.03);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius-sm);
}

/* About page specific compact styling */
body.about-page .profile-section {
  margin-bottom: var(--spacing-md);
}

body.about-page .section {
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
}

body.about-page h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
}

body.about-page .section-title {
  margin-bottom: var(--spacing-sm);
  margin-top: 0;
}

body.about-page p {
  margin-bottom: var(--spacing-sm);
}

body.about-page .footer, body.about-page footer {
  margin-top: var(--spacing-sm);
}

body.about-page #timeline-container {
  margin: var(--spacing-md) 0;
}

/* Skills list styling - keep the nice arrows and table structure */
.skills-list {
  list-style: none;
  padding-left: 0;
  margin: var(--spacing-md) 0;
}

.skills-list li {
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-xs) 0;
  display: flex;
  align-items: center;
  background-color: var(--light-bg);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.skills-list li:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

.skills-list li::before {
  content: '→';
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: var(--spacing-sm);
  font-size: 1.2rem;
}

.skills-list strong {
  color: var(--tertiary-color);
  font-weight: 600;
  margin-left: var(--spacing-sm);
}

/* Utility Classes */
.text-primary {
  color: var(--primary-color) !important;
}

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

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

.bg-light {
  background-color: var(--light-bg) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--border-color) !important;
}

.rounded {
  border-radius: var(--border-radius-md) !important;
}

.shadow {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}