/* ==========================================================================
   MINIMAL CV THEME
   Accent Color: #34d399 (Emerald Green)
   ========================================================================== */

/* CSS Variables */
:root {
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #0891b2;
  --max-width: 1200px;
}

html[data-theme="dark"] {
  --color-bg: #000000;
  --color-surface: #0a0a0a;
  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-border: #27272a;
  --color-accent: #34d399;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
  z-index: 1000;
  opacity: 0.6;
}

.theme-toggle:hover {
  opacity: 1;
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.theme-toggle i {
  transition: transform 0.2s ease;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero-avatar {
  margin: 0 auto 2rem;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-accent);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #000;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero .role {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.hero .summary {
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: var(--color-text-muted);
}

.hero .location {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  opacity: 1;
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: var(--color-accent);
  color: #000;
  opacity: 1;
}

/* Now Section */
.now-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 2rem;
  margin: 3rem auto;
  max-width: 600px;
  text-align: left;
}

.now-section h3 {
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.now-section ul {
  list-style: none;
  margin-top: 1rem;
}

.now-section li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.now-section li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* Tech Section */
.tech-section {
  padding: 4rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.tech-section h3 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  text-align: center;
}

.tech-item i {
  font-size: 2.5rem;
  color: var(--color-accent);
}

.tech-item span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* About Page */
.about-page {
  padding: 4rem 0;
}

.about-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.about-avatar {
  margin: 0 auto 2rem;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-accent);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.about-hero .subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

/* Content Styling */
.about-content,
.content {
  max-width: 800px;
  margin: 0 auto;
}

.intro-section {
  margin-bottom: 4rem;
}

h2 {
  font-size: 1.875rem;
  margin: 2rem 0 1rem;
  color: var(--color-accent);
}

h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 0.75rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  font-weight: 700;
  color: var(--color-accent);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 3rem;
}

.timeline-marker {
  position: absolute;
  left: -6px;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 2rem;
}

.timeline-content h3 {
  margin-top: 0;
}

.timeline-content em {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Social Links */
.social-links {
  margin: 1rem 0 1.5rem;
  text-align: center;
}

.social-links h3 {
  margin-bottom: 2rem;
}

.social-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-grid a {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 2rem;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.social-grid a:hover {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #000;
  transform: translateY(-2px);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.social-grid a:hover i {
  color: #000;
}

.social-grid i {
  color: var(--color-accent);
  font-size: 1.1rem;
  transition: color 0.2s;
}

.about-hero .social-links {
  margin: 1rem 0;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
    font-size: 0.875rem;
  }

  .timeline-item {
    padding-left: 2rem;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  .theme-toggle {
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   PRINT STYLES - Optimized for PDF Generation
   ========================================================================== */

@media print {
  /* Reset colors for print */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 1.5cm 2cm;
  }

  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .nav-menu,
  .theme-toggle {
    display: none !important;
  }

  /* Body and container */
  body {
    font-size: 10pt;
    line-height: 1.4;
    font-family: 'Georgia', 'Times New Roman', serif;
  }

  .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .about-page {
    padding: 0;
  }

  /* Hero section */
  .about-hero {
    text-align: center;
    margin-bottom: 1.5rem;
    page-break-after: avoid;
  }

  .about-hero h1 {
    font-size: 20pt;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #000 !important;
  }

  .about-hero .subtitle {
    font-size: 11pt;
    color: #333 !important;
    margin-bottom: 0.5rem;
  }

  /* Social links - show in print as contact info */
  .social-links {
    display: block !important;
    text-align: center;
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
  }

  .social-links h3 {
    display: none;
  }

  .social-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 2rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
  }

  .social-grid a {
    display: block !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: #000 !important;
    font-size: 9pt;
    text-decoration: none;
    page-break-inside: avoid;
  }

  .social-grid a i {
    display: none;
  }

  .social-grid a span {
    display: inline !important;
    font-weight: bold;
  }

  .social-grid a span::after {
    content: ": ";
    font-weight: normal;
  }

  /* Show clean URLs from data attribute */
  .social-grid a::after {
    content: attr(data-print-url);
    font-weight: normal;
  }

  /* Headings */
  h2 {
    font-size: 14pt;
    font-weight: bold;
    color: #000 !important;
    border-bottom: 2px solid #444;
    padding-bottom: 0.25rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    page-break-after: avoid;
  }

  h3 {
    font-size: 12pt;
    font-weight: bold;
    color: #000 !important;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    page-break-after: avoid;
  }

  /* Content */
  p {
    margin-bottom: 0.5rem;
    orphans: 3;
    widows: 3;
  }

  ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
  }

  li {
    margin-bottom: 0.2rem;
    page-break-inside: avoid;
  }

  strong {
    font-weight: bold;
    color: #000 !important;
  }

  em {
    font-style: italic;
    color: #333 !important;
  }

  /* Links */
  a {
    color: #000 !important;
    text-decoration: underline;
  }

  /* Don't show URLs after regular content links */
  .about-content a[href^="http"]:after,
  .timeline-content a[href^="http"]:after {
    content: "";
  }

  /* Timeline - Simplified for print */
  .timeline {
    margin-top: 0.5rem;
  }

  .timeline::before {
    display: none; /* Hide timeline line in print */
  }

  .timeline-item {
    padding-left: 0;
    margin-bottom: 1rem;
    page-break-inside: avoid;
    border-left: 3px solid #444;
    padding-left: 0.75rem;
  }

  .timeline-marker {
    display: none; /* Hide markers in print */
  }

  .timeline-content {
    background: white !important;
    border: none !important;
    padding: 0;
    margin-bottom: 0.5rem;
  }

  .timeline-content p:first-child {
    margin-top: 0;
  }

  .timeline-content p:last-child {
    margin-bottom: 0;
  }

  /* Compact spacing for print */
  .intro-section {
    margin-bottom: 0;
  }

  .about-content {
    max-width: 100%;
  }

  /* Ensure sections don't break awkwardly */
  .intro-section > h2,
  .intro-section > h3 {
    page-break-before: auto;
  }

  /* Competencies list */
  .intro-section ul {
    columns: 1;
    column-gap: 1rem;
  }

  /* Page breaks */
  .timeline-item {
    page-break-inside: avoid;
  }

  h2 {
    page-break-after: avoid;
  }

  /* Remove unnecessary spacing */
  .about-avatar,
  .hero-avatar,
  .flag {
    display: none !important;
  }

  /* Adjust spacing between sections */
  .intro-section > *:first-child {
    margin-top: 0;
  }
}
