/* ===================================================================
   Jakub Mikos — Corporate Portfolio
   Fonts: Fraunces (display) + DM Sans (body)
   Palette: deep navy + warm amber accent
   =================================================================== */

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

:root {
  /* Colour system */
  --navy-950: #0a0f1e;
  --navy-900: #0f1729;
  --navy-800: #162036;
  --navy-700: #1e2d4a;
  --navy-600: #2a3f63;
  --navy-100: #c8d3e8;
  --navy-50:  #e8ecf4;

  --amber-500: #d4983b;
  --amber-400: #e5ad4f;
  --amber-300: #f0c778;

  --white:    #ffffff;
  --grey-50:  #f8f9fb;
  --grey-100: #f0f2f5;
  --grey-200: #e2e5eb;
  --grey-300: #c9cdd6;
  --grey-500: #6b7280;
  --grey-700: #374151;
  --grey-900: #111827;

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

  /* Spacing */
  --section-py: clamp(4rem, 8vw, 7rem);
  --container-max: 1120px;
  --container-px: clamp(1.25rem, 4vw, 2.5rem);

  /* Transitions */
  --ease-out: cubic-bezier(.25, .46, .45, .94);

  /* Semantic colours — light mode (default) */
  --bg-body: var(--white);
  --bg-alt: var(--grey-50);
  --bg-card: var(--white);
  --bg-nav: rgba(255, 255, 255, .92);
  --bg-nav-mobile: rgba(255, 255, 255, .98);
  --bg-code: var(--grey-100);
  --bg-tech-tag: var(--navy-900);
  --text-primary: var(--grey-700);
  --text-heading: var(--navy-900);
  --text-secondary: var(--grey-500);
  --text-strong: var(--navy-900);
  --text-tech-tag: var(--navy-50);
  --border-color: var(--grey-200);
  --shadow-hover: rgba(0, 0, 0, .06);
  --timeline-marker-bg: var(--white);
  --avatar-bg: var(--navy-900);
  --avatar-color: var(--white);
  --skill-pill-color: var(--grey-700);
  --skill-pill-hover-color: var(--navy-900);
}

/* Dark mode */
[data-theme="dark"] {
  --bg-body: #0f1219;
  --bg-alt: #161b26;
  --bg-card: #1a2030;
  --bg-nav: rgba(15, 18, 25, .92);
  --bg-nav-mobile: rgba(15, 18, 25, .98);
  --bg-code: #1e2535;
  --bg-tech-tag: var(--amber-500);
  --text-primary: #b0b8c9;
  --text-heading: #e2e8f0;
  --text-secondary: #7b8494;
  --text-strong: #e2e8f0;
  --text-tech-tag: #0f1219;
  --border-color: #252d3d;
  --shadow-hover: rgba(0, 0, 0, .3);
  --timeline-marker-bg: #0f1219;
  --avatar-bg: var(--amber-500);
  --avatar-color: #0f1219;
  --skill-pill-color: #b0b8c9;
  --skill-pill-hover-color: #e2e8f0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-body);
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* --- Navigation ---------------------------------------------------- */
.site-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background .3s var(--ease-out);
}

.nav-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 var(--container-px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-heading);
  letter-spacing: -.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.nav-link:hover { color: var(--text-heading); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: .25s;
}

/* --- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem var(--container-px) 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, var(--navy-800), transparent),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 100%);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60L60 0' stroke='%23ffffff' stroke-width='.3' opacity='.06'/%3E%3C/svg%3E") repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(229, 173, 79, .3);
  padding: .35rem 1rem;
  border-radius: 100px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: .5rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--navy-100);
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--grey-300);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 2rem;
  line-height: 1.75;
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.stat { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
}

.stat-label {
  font-size: .75rem;
  color: var(--grey-300);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Hero Testimonial Rotator */
.hero-testimonials {
  position: relative;
  margin: 0 auto 2.5rem;
  max-width: 620px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.75rem;
}

.hero-testimonials-track {
  position: relative;
  margin-inline: auto;
  min-height: 90px;
}

.hero-testimonial {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .6rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
  pointer-events: none;
}

.hero-testimonial.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.hero-quote-icon {
  color: var(--amber-400);
  opacity: .6;
  flex-shrink: 0;
}

.hero-testimonial-text {
  font-size: .95rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--grey-300);
  max-width: 600px;
}

.hero-testimonial-cite {
  font-size: .78rem;
  font-weight: 500;
  color: var(--amber-400);
  letter-spacing: .02em;
}

.hero-testimonial-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.3);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all .25s var(--ease-out);
}

.hero-dot:hover {
  border-color: rgba(255,255,255,.6);
}

.hero-dot.active {
  background: var(--amber-400);
  border-color: var(--amber-400);
  transform: scale(1.2);
}

/* --- Generic Section ----------------------------------------------- */
.section {
  padding: var(--section-py) 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber-500);
  margin-bottom: .5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -.02em;
  line-height: 1.2;
}

/* --- About --------------------------------------------------------- */
.about { background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
}
.about-text strong { color: var(--text-strong); }

.about-list {
  margin: .75rem 0 1.25rem;
  display: grid;
  gap: .5rem;
}

.about-list li {
  display: flex;
  gap: .6rem;
  align-items: baseline;
}

.list-icon {
  color: var(--amber-500);
  font-size: .85rem;
  flex-shrink: 0;
}

.about-details {
  display: grid;
  gap: 1rem;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.detail-card h3 {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-secondary);
  margin-bottom: .25rem;
}

.detail-card p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
}

/* --- Experience / Timeline ----------------------------------------- */
.experience { background: var(--bg-body); }

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

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--timeline-marker-bg);
  border: 2.5px solid var(--amber-500);
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  transition: box-shadow .25s var(--ease-out);
}
.timeline-content:hover {
  box-shadow: 0 4px 20px var(--shadow-hover);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.timeline-company {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-heading);
}

.timeline-role {
  font-size: .9rem;
  color: var(--text-secondary);
}

.timeline-type { font-weight: 400; }

.timeline-dates {
  font-size: .8rem;
  font-weight: 500;
  color: var(--amber-500);
  white-space: nowrap;
}

.timeline-summary {
  font-size: .95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tech-tag {
  font-size: .72rem;
  font-weight: 500;
  padding: .2rem .6rem;
  background: var(--bg-tech-tag);
  color: var(--text-tech-tag);
  border-radius: 4px;
  letter-spacing: .02em;
}

/* --- Skills -------------------------------------------------------- */
.skills { background: var(--bg-alt); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
}

.skill-group-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 1rem;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.skill-pill {
  font-size: .8rem;
  font-weight: 500;
  padding: .3rem .8rem;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--skill-pill-color);
  transition: all .2s;
}
.skill-pill:hover {
  border-color: var(--amber-500);
  color: var(--skill-pill-hover-color);
}

/* --- Testimonials -------------------------------------------------- */
.testimonials { background: var(--bg-body); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s var(--ease-out);
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px var(--shadow-hover);
}

.quote-icon {
  color: var(--amber-400);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.testimonial-text {
  font-size: .95rem;
  font-style: italic;
  line-height: 1.75;
  color: var(--text-primary);
  flex: 1;
  margin-bottom: 1.25rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  flex-shrink: 0;
}

img.author-avatar {
  object-fit: cover;
}

.author-name {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-heading);
}

.author-role {
  display: block;
  font-size: .78rem;
  color: var(--text-secondary);
}

.testimonials-note {
  text-align: center;
  margin-top: 2rem;
  font-size: .8rem;
  color: var(--text-secondary);
}
.testimonials-note code {
  background: var(--bg-code);
  padding: .15rem .4rem;
  border-radius: 3px;
  font-size: .78rem;
}

/* --- Contact ------------------------------------------------------- */
.contact {
  background: var(--navy-950);
  color: var(--grey-300);
}
.contact .section-tag { color: var(--amber-400); }
.contact .section-title { color: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.contact-text p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.contact-methods {
  display: grid;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--navy-700);
  border-radius: 8px;
  transition: all .25s var(--ease-out);
}
.contact-card:hover {
  border-color: var(--amber-500);
  background: rgba(255,255,255,.03);
}

.contact-icon {
  flex-shrink: 0;
  color: var(--amber-400);
}

.contact-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-secondary);
}

.contact-value {
  font-size: .95rem;
  font-weight: 500;
  color: var(--white);
}

/* --- Footer -------------------------------------------------------- */
.site-footer {
  background: var(--navy-950);
  border-top: 1px solid var(--navy-800);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--text-secondary);
}

.back-to-top {
  font-weight: 500;
  transition: color .2s;
}
.back-to-top:hover { color: var(--amber-400); }

/* --- Theme Toggle -------------------------------------------------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-secondary);
  transition: color .2s, border-color .2s, background .2s;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--amber-500);
  border-color: var(--amber-500);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* --- Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-nav-mobile);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem var(--container-px);
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.2rem; }

  .hero-testimonial-text { font-size: .85rem; }
  .hero-testimonials-track { min-height: 110px; }

  .timeline { padding-left: 1.5rem; }
  .timeline-marker { left: -1.5rem; }
  .timeline-header { flex-direction: column; gap: .25rem; }
}

/* --- Entrance Animations ------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow { animation: fadeUp .6s var(--ease-out) .2s both; }
.hero-title    { animation: fadeUp .6s var(--ease-out) .35s both; }
.hero-subtitle { animation: fadeUp .6s var(--ease-out) .5s both; }
.hero-desc     { animation: fadeUp .6s var(--ease-out) .6s both; }
.hero-testimonials { animation: fadeUp .6s var(--ease-out) .7s both; }
.hero-stats    { animation: fadeUp .6s var(--ease-out) .85s both; }
