/* ============================
   CV / Resume — Szulakowski.PL
   Design Tokens & Styles
   ============================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --navy: #1b2d4f;
  --navy-deep: #131a2b;
  --amber: #c8872e;
  --amber-light: #d9a35c;
  --amber-glow: rgba(200, 135, 46, 0.15);
  --bg-light: #f5f6f8;
  --bg-white: #ffffff;
  --text-primary: #1b2d4f;
  --text-secondary: #4a5568;
  --text-light: #e8ecf1;
  --text-muted-light: #94a3b8;
  --border-light: #e2e5ea;
  --border-dark: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(27, 45, 79, 0.06);
  --shadow-md: 0 4px 12px rgba(27, 45, 79, 0.08);
  --shadow-lg: 0 8px 24px rgba(27, 45, 79, 0.1);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--navy);
  color: var(--text-light);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 100;
  transition: top var(--duration) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* --- Section --- */
.section {
  padding: clamp(var(--space-10), 5vw, var(--space-16)) 0;
}
.section--light {
  background: var(--bg-light);
}
.section--dark {
  background: var(--navy-deep);
}
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}
.section-heading--light {
  color: var(--text-light);
}

/* ============================
   HEADER
   ============================ */
.cv-header {
  background: var(--navy);
  color: var(--text-light);
  padding: clamp(var(--space-12), 6vw, var(--space-20)) 0 clamp(var(--space-10), 5vw, var(--space-16));
  position: relative;
  overflow: hidden;
}
.cv-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 135, 46, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.header-content {
  position: relative;
  z-index: 1;
}
.header-name {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-2);
  color: #fff;
}
.header-title {
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 500;
  color: var(--amber);
  margin-bottom: var(--space-3);
  letter-spacing: 0.01em;
}
.header-tagline {
  font-size: clamp(14px, 1.8vw, 16px);
  color: var(--text-muted-light);
  max-width: 600px;
  line-height: 1.5;
  margin-bottom: var(--space-8);
}
.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
}
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-muted-light);
  transition: color var(--duration) var(--ease-out);
  white-space: nowrap;
}
.contact-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
a.contact-item:hover {
  color: var(--amber-light);
}
a.contact-item:hover svg {
  opacity: 1;
}

/* ============================
   PROFESSIONAL SUMMARY
   ============================ */
.summary-text {
  max-width: 760px;
}
.summary-text p {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================
   CORE COMPETENCIES
   ============================ */
.competencies-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pill {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-dark);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted-light);
  letter-spacing: 0.01em;
  transition: all var(--duration) var(--ease-out);
}
.pill:hover {
  background: var(--amber-glow);
  border-color: rgba(200, 135, 46, 0.3);
  color: var(--amber-light);
}

/* ============================
   PROFESSIONAL EXPERIENCE
   ============================ */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-light);
}
.timeline-entry {
  position: relative;
  padding-bottom: var(--space-8);
}
.timeline-entry:last-child {
  padding-bottom: 0;
}
.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-8) + 2px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-light);
  border: 2px solid var(--amber);
  z-index: 1;
  transition: background var(--duration) var(--ease-out);
}
.timeline-entry:first-child .timeline-marker {
  background: var(--amber);
}
.timeline-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}
.timeline-content:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.role-title {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.8vw, 17px);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.role-company {
  font-size: 14px;
  color: var(--amber);
  font-weight: 500;
  margin-top: 2px;
}
.role-dates {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 2px var(--space-3);
  background: var(--bg-light);
  border-radius: 100px;
  flex-shrink: 0;
  margin-top: 2px;
}
.role-details {
  padding-left: var(--space-4);
}
.role-details li {
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: var(--space-4);
  margin-bottom: var(--space-1);
}
.role-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.6;
}

/* ============================
   CERTIFICATIONS
   ============================ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}
.cert-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  transition: all var(--duration) var(--ease-out);
}
.cert-card:hover {
  background: var(--amber-glow);
  border-color: rgba(200, 135, 46, 0.3);
  transform: translateY(-2px);
}
.cert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(200, 135, 46, 0.12);
  color: var(--amber);
}
.cert-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
}
.cert-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted-light);
  margin-top: 2px;
}

/* ============================
   EDUCATION
   ============================ */
.education-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.education-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--duration) var(--ease-out);
}
.education-item:hover {
  box-shadow: var(--shadow-sm);
}
.education-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(200, 135, 46, 0.1);
  color: var(--amber);
  margin-top: 2px;
}
.education-school {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.education-degree {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================
   TECHNICAL SKILLS
   ============================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}
.skill-category {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.skill-category-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.skill-category-items {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted-light);
}

/* ============================
   LANGUAGES
   ============================ */
.languages-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 500px;
}
.language-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto;
  gap: 2px var(--space-4);
  align-items: center;
}
.language-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.language-level {
  font-size: 13px;
  color: var(--text-secondary);
}
.language-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--border-light);
  border-radius: 100px;
  overflow: hidden;
  margin-top: var(--space-1);
}
.language-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--amber));
  border-radius: 100px;
  transition: width 1s var(--ease-out);
}

/* ============================
   FOOTER
   ============================ */
.cv-footer {
  background: var(--navy);
  padding: var(--space-10) 0 var(--space-8);
  border-top: 1px solid rgba(200, 135, 46, 0.2);
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  text-align: center;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--duration) var(--ease-out);
}
.footer-logo:hover {
  color: var(--amber-light);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted-light);
  transition: color var(--duration) var(--ease-out);
}
.footer-links a:hover {
  color: var(--amber-light);
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted-light);
  opacity: 0.6;
}

/* ============================
   SCROLL ANIMATIONS
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   PRINT STYLES
   ============================ */
@media print {
  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }
  .cv-header {
    background: #fff;
    color: #000;
    padding: 20pt 0;
  }
  .header-name {
    color: #000;
    font-size: 24pt;
  }
  .header-title {
    color: var(--amber);
    font-size: 14pt;
  }
  .header-tagline, .contact-item {
    color: #333;
  }
  .section--dark {
    background: #f5f5f5;
  }
  .section-heading--light {
    color: #000;
  }
  .pill {
    background: #f0f0f0;
    border-color: #ddd;
    color: #333;
  }
  .cert-card {
    background: #f5f5f5;
    border-color: #ddd;
  }
  .cert-name, .skill-category-items, .text-muted-light {
    color: #333;
  }
  .skill-category {
    background: #f5f5f5;
    border-color: #ddd;
  }
  .cv-footer {
    background: #fff;
    border-top: 1px solid #ddd;
  }
  .footer-logo, .footer-links a, .footer-copy {
    color: #333;
  }
  .timeline-content {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
  .contact-strip {
    gap: var(--space-2) var(--space-4);
  }
  .contact-item {
    font-size: 12px;
  }
  .role-header {
    flex-direction: column;
    gap: var(--space-1);
  }
  .role-dates {
    align-self: flex-start;
  }
  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .timeline {
    padding-left: var(--space-6);
  }
  .timeline-marker {
    left: calc(-1 * var(--space-6) + 2px);
  }
}

@media (max-width: 480px) {
  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
  .cert-card {
    padding: var(--space-4) var(--space-3);
  }
  .cert-icon {
    width: 40px;
    height: 40px;
  }
  .cert-icon svg {
    width: 22px;
    height: 22px;
  }
}
