/*<weight>: Use a value from 100 to 900
<uniquifier>: Use a unique and descriptive class name*/

/* inter-regular - latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/inter-v20-latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-italic - latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/inter-v20-latin-ext-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-700 - latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/inter-v20-latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; 
}

body {
    font-family: "Inter", sans-serif;
    font-weight: 400;                  /* Domyślna waga dla tekstów, czyli Twój Regular */
  font-size: 16px;
  line-height: 1.6;
  margin: 0px;
  background-color: rgb(226, 226, 226);
}

:root {
  --color-font-white: #eaeaea;
  --color-font-desc:#555;
  --color-primary-blue: #3b6cf3;
  --border-radius: 12px;
  --section-margin: 1rem;
  --color-hover: rgb(230, 233, 235);
}

.no-break {
  white-space: nowrap;
}

nav {
  background-color: var(--color-primary-blue);
  color: var(--color-font-white);
  margin: 0px;
  display: flex;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.295), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  

  position: sticky;
  top: 0;
  z-index: 1000; 
  transition: all 0.3s ease;
}
#logo{
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 2rem;
    
    width: 25%;
}

#nav-links{
    display: flex;
  gap: 2rem;
  justify-content: space-around;
  width: 50%;
}
nav ul{
    list-style-type: none;
}
nav li{
    padding: 2rem;
    color: rgb(0, 0, 0);
    transition: padding 0.3s ease;
}
nav li a {
    color: var(--color-font-white);
    text-decoration: none;
}
nav li a:hover{
    color: var(--color-font-white);
    text-decoration:line-through;
}
nav.scrolled li {
  padding: 0.6rem; /* Shrinks to 80% of the original 2rem height */
}

@media (max-width: 1200px) {
  #nav-links {
    width: 75%;
    gap: 0.5rem;
  }
  
  nav li {
    padding: 2rem 1rem;
  }
}
@media (max-width: 900px) {
  #nav-links {
    display: none;
  }
  
  #logo {
    width: 100%;
    padding-left: 0;
    justify-content: center;
  }
}
#hero {
  height: 400px; 
  overflow: hidden;
  margin: var(--section-margin);
  display: flex;
  justify-content: center;
  width: auto;
}

#hero-bg {

  width: 100%;
  height: 100%;
  max-width: 1203px;
  object-fit: cover;
 object-position: top left;
  z-index: -1;
border-top-left-radius: var(--border-radius);
border-bottom-left-radius: var(--border-radius);
}

#hero-content{
    display:flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
  margin:1rem;
  margin-top: 0;
  padding-top: 0;
  padding:3.5rem;
  background-color: rgb(255, 255, 255);
  color: var(--color-font-desc);
  margin: 0px;
  border-top-right-radius: var(--border-radius);
border-bottom-right-radius: var(--border-radius);
flex: 1;

}
#hero-content h1{
    color:var(--color-primary-blue);
}

@media (max-width: 900px) { 
  #hero{
    flex-direction: column;
    
  }
  #hero-bg{
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius);
  }
  #hero-content{
      border-top-right-radius:0;
      border-bottom-left-radius: var(--border-radius);
      padding: 1rem;
  }

}

.skills-section{
  display: flex;
  flex-direction: column;
background-color: var(--color-primary-blue);
  margin: var(--section-margin);
  border-radius: var(--border-radius);

}
.skills-section h2{
  margin: 1rem;
  display: flex;
  justify-content: center;
  color:var(--color-font-white);
}

#cert-section{

}


.list{
  display: flex;
  flex-direction: row;

  overflow-x: auto; /* Enables horizontal scrolling when content overflows */
  flex-wrap: nowrap; /* Forces items to stay on a single line */
  /* Optional: Makes scrolling feel smoother on touch devices */
  -webkit-overflow-scrolling: touch; 
  scroll-snap-type: x mandatory;
}

@media (min-width: 900px) { 
  .list {
    display:grid;
    grid-template-columns: auto auto auto;
  }

  #project-section .list .project-card:nth-child(n+4) {
    display: none;
  }

  #project-section .list.show-all .project-card:nth-child(n+4) {
    display: block;
  }
  #project-section hr{
  display: block;
}
  
}

@media (max-width: 900px) {
  .show-more-projects-container {
    display: none !important;
  }
  #project-section hr{
  display: none;
}
}
#project-section hr{
  width:90%;
  border-width: 2px;
  background-color: white;
  color:white;
  border-radius: 30px;
  padding-bottom: 4px;
  margin-top: 30px;
}

.show-more-projects-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  width: 100%;
}

#show-more-projects-btn {
  margin-top: 30px;
  padding: 20px;
  background-color: #1a3a91;
}

/* cert, projects cards*/

.expandable-card {
  background: #ffffff;
  min-width: 250px;
  border-radius: var(--border-radius);
  padding: 24px;
  margin: 10px;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.3s ease;
  
}

.expandable-card img{
  height: auto;       /* Fill the height constraint */
  max-height: 400px;
  width: 100%;        /* Fill the width of the card */
  object-fit: contain;  /* Maintains aspect ratio by cropping instead of stretching */
  padding-top: 1.2rem;
}



.expandable-card:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  background-color: var(--color-hover);
}

.expandable-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--color-primary-blue);
}
.expandable-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--color-primary-blue);
}

.card-short-desc {
  color: var(--color-font-desc);
  line-height: 1.5;
  margin-bottom: 20px;
}

.show-more-btn {
  font-family: inherit;
  background: #1a3a91;
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.show-more-btn:hover {
  background: #0052a3;
}

.show-more-btn:active {
  transform: scale(0.98);
}

.show-more-btn .icon {
  transition: transform 0.3s ease;
}

.card-more-info {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.card-more-info p {
  color: #333;
  line-height: 1.6;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.expandable-card.active .card-more-info {
  max-height: 300px;
  opacity: 1;
  margin-top: 16px;
}

.expandable-card.active .show-more-btn .icon {
  transform: rotate(180deg);
}



/* ===== Project card: only what differs from a cert card ===== */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-card .card-short-desc {
  flex-grow:0; /* pushes actions row to the bottom evenly */
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.github-btn {
  background: #24292e;
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  transition: background 0.2s ease;
  display: inline-block;
}

.github-btn:hover {
  background: #000000;
}

.linkedin-btn {
  background: #0a66c2;
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  transition: background 0.2s ease;
  display: inline-block;
}

.linkedin-btn:hover {
  background: #000000;
}
.leetcode-btn {
  background: #c28b0a;
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  transition: background 0.2s ease;
  display: inline-block;
}

.leetcode-btn:hover {
  background: #000000;
}

.email-btn{

}

.about-card:hover, .contact-card:hover{
  background-color: #ffffff;
}


.site-footer {
  background-color: #1a1a1a; 
  color: var(--color-font-white);
  padding: 30px 20px;
  margin-top: 40px; 
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content p {
  margin: 0;
  color: #aaa;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--color-font-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: bold;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-primary-blue);
  text-decoration: underline;
}

@media (min-width: 600px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}


@media (max-width: 380px) {
  #cert-section, #project-section {
    position: relative;
  }

  #cert-section::before, #project-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.306));
    pointer-events: none;
    z-index: 2;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
  }


  #cert-section::after, #project-section::after {
    content: '➔';
    position: absolute;
    right: 8px;
    bottom: 8px;
    color: black;
    font-size: 1.6rem;
    opacity: 0.7;
    pointer-events: none;
    animation: swipeHint 1.6s infinite ease-in-out;
    z-index: 3;
  }

  @keyframes swipeHint {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(6px); opacity: 1; }
  }
}

