:root {
  --background: 218, 80%, 16%;
  --foreground: 210, 40%, 98%;
  --card: 217, 60%, 15%;
  --primary: 210, 100%, 70%;
  --secondary: 215, 40%, 20%;
  --accent: 278, 100%, 70%;
  --border: 217, 60%, 25%;
  --radius: 0.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1d3557; /* granatowy */
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

#popup.show {
  display: block;
  opacity: 1;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: hsla(var(--secondary), 0.3);
}

::-webkit-scrollbar-thumb {
  background-color: hsla(var(--primary), 0.6);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--primary));
}

/* Background Elements */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
}

.bg-element {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: pulse 8s ease-in-out infinite;
}

.bg-element-1 {
  top: 0;
  right: 0;
  width: 33%;
  height: 33%;
  background-color: hsla(var(--primary), 0.2);
}

.bg-element-2 {
  bottom: 0;
  left: 0;
  width: 33%;
  height: 33%;
  background-color: hsla(var(--accent), 0.2);
  animation-delay: 1s;
}

/* Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: hsla(var(--foreground), 0.1);
  z-index: 50;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
  width: 0%;
  transition: width 0.1s;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 40;
  transition: all 0.3s;
  padding: 1rem 0;
}

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

.glass-card {
  background-color: hsla(var(--background), 0.3);
  backdrop-filter: blur(16px);
  border: 1px solid hsla(var(--foreground), 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
}

header.scrolled {
  background-color: hsla(var(--background), 0.3);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid hsla(var(--foreground), 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: transparent; /* Usuń przyciemnienie */
}


.logo.loaded {
  opacity: 1;
}

.logo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsla(var(--primary), 0.5), hsla(var(--accent), 0.5));
  filter: blur(8px);
  opacity: 0.5;
  animation: glow 8s ease-in-out infinite;
}

.logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  position: relative;
  z-index: 10;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.05em;
  transition: all 0.7s;
  transform: translateX(-40px);
  opacity: 0;
}

.site-title.loaded {
  transform: translateX(0);
  opacity: 1;
}

.glow-text {
  color: transparent;
  background-image: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
  background-clip: text;
  -webkit-background-clip: text;
}

/* Navigation */
.desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    gap: 0.25rem;
  }
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsla(var(--foreground), 0.7);
  text-decoration: none;
  transition: all 0.3s;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: hsla(var(--primary), 0.8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: hsl(var(--primary));
}

.nav-link.active::after {
  transform: scaleX(1);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 0.5rem;
  transition: all 0.7s;
  transform: translateX(40px);
  opacity: 0;
}

.social-links.loaded {
  transform: translateX(0);
  opacity: 1;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: hsla(var(--foreground), 0.05);
  color: hsl(var(--foreground));
  transition: all 0.3s;
  text-decoration: none;
}

.social-button:hover {
  background-color: hsla(var(--foreground), 0.1);
  transform: translateY(-3px);
}

.social-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Mobile Navigation */
.mobile-nav-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

.mobile-nav {
  display: flex;
  padding: 0.5rem;
  border-radius: 100px;
  backdrop-filter: blur(16px);
}

.mobile-nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsla(var(--foreground), 0.7);
  text-decoration: none;
  transition: all 0.3s;
  border-radius: 100px;
}

.mobile-nav-link.active {
  color: hsl(var(--primary));
  background-color: hsla(var(--foreground), 0.05);
}

@media (min-width: 768px) {
  .mobile-nav-container {
    display: none;
  }
}

/* Main Content */
main {
  padding-top: 6rem;
  padding-bottom: 5rem;
}

.section {
  padding: 4rem 0;
  min-height: 70vh;
}

/* Section Heading */
.section-heading {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 2rem;
  display: inline-block;
  position: relative;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--accent)));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.section-heading:hover::after {
  transform: scaleX(1);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 2fr;
  }
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  padding: 1.5rem;
  border-radius: var(--radius);
}

.info-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.star {
  color: hsl(var(--primary));
}

.font-medium {
  font-weight: 500;
}

.link-cert, a{
  font-weight: 500;
  color: hsl(var(--primary));
  text-decoration: none;
}



/* Accordion */
.accordion-container {
  margin-top: 0.5rem;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: hsla(var(--background), 0.3);
  backdrop-filter: blur(16px);
  border: 1px solid hsla(var(--foreground), 0.1);
}

.accordion-header {
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.accordion-icon {
  transition: transform 0.3s;
  color: hsla(var(--foreground), 0.7);
}

.accordion-icon.rotated {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-content p {
  padding: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid hsla(var(--foreground), 0.1);
  color: hsla(var(--foreground), 0.7);
}

.accordion-actions {
  padding: 0 1rem 1rem 1rem;
  display: flex;
  justify-content: flex-start;
}

/* About Preview Card */
.about-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-card {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 3/2;
  border-radius: 1rem;
  overflow: hidden;
  padding: 0.125rem;
}

.preview-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsla(var(--primary), 0.3), hsla(var(--accent), 0.3));
  animation: pulse 8s ease-in-out infinite;
}

.preview-content {
  position: relative;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: calc(1rem - 2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 10;
}

.avatar-container {
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite;
}

.avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: transparent; /* Usuń przyciemnienie */
}

.preview-title {
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.preview-text {
  color: hsla(var(--foreground), 0.8);
  max-width: 28rem;
  margin-bottom: 2rem;
}

.preview-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  position: relative;
  overflow: hidden;
}

.button::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: hsla(var(--foreground), 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.button:hover::after {
  transform: scaleX(1);
}

.primary-button {
  background-color: hsl(var(--primary));
  color: black;
}

.outline-button {
  background-color: transparent;
  border: 1px solid hsla(var(--primary), 0.5);
  color: hsl(var(--primary));
}

.small-button {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

.mt-4 {
  margin-top: 1rem;
}

.button-icon {
  transition: transform 0.3s;
}

.primary-button:hover .button-icon {
  transform: rotate(-90deg);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skill-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  height: 100%;
  transition: all 0.5s;
  transform: translateY(2rem);
  opacity: 0;
}

.skill-card.visible {
  transform: translateY(0);
  opacity: 1;
}

.skill-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.skill-level {
  color: hsla(var(--foreground), 0.8);
  margin-bottom: 1rem;
}

.skill-actions {
  margin-top: 1rem;
}

.skills-features {
  padding: 2rem;
  border-radius: var(--radius);
}

.skills-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .skills-features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-icon-container {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background-color: hsla(var(--background), 0.3);
  backdrop-filter: blur(16px);
  border: 1px solid hsla(var(--foreground), 0.1);
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  color: hsl(var(--primary));
}

.feature-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.feature-text {
  color: hsla(var(--foreground), 0.7);
}

/* Experience Section */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .experience-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.experience-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  height: 100%;
  transition: all 0.5s;
  transform: translateY(2rem);
  opacity: 0;
}

.experience-card.visible {
  transform: translateY(0);
  opacity: 1;
}

.experience-company {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.experience-period {
  color: hsla(var(--foreground), 0.8);
  margin-bottom: 1rem;
}

.experience-actions {
  margin-top: 1rem;
}

.timeline-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.timeline {
  max-width: 40rem;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius);
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

.timeline-line {
  position: relative;
  padding: 2rem 0;
}

.timeline-line-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: hsla(var(--foreground), 0.1);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: flex;
  margin-bottom: 2rem;
  align-items: center;
}

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

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: hsl(var(--primary));
  border: 4px solid hsl(var(--background));
  z-index: 10;
}

.timeline-content {
  width: 50%;
}

.timeline-content-left {
  padding-right: 2rem;
  text-align: right;
}

.timeline-content-right {
  padding-left: 2rem;
}

.timeline-year {
  font-weight: bold;
}

.timeline-label {
  color: hsla(var(--foreground), 0.7);
}

.timeline-actions {
  display: none;
}

/* Footer */
.footer {
  width: 100%;
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-text {
  text-align: center;
  color: hsla(var(--foreground), 0.6);
  font-size: 0.875rem;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.7;
  }
}

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

@keyframes glow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(2rem);
  transition: all 0.5s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
