/* ============================================
   Konrad Grochowski — Portfolio Styles
   Dark theme, neon accents, modern animations
   ============================================ */

:root {
  --primary-color: #66FD0F;
  --dark-color: #0F0E10;
  --dark-card: #1a181c;
  --white-color: #FFFFFF;
  --light-secondary: #929292;
  --border-color: rgba(255,255,255,0.1);

  --heading-font: "Space Grotesk", sans-serif;
  --body-font: "Space Grotesk", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  background-color: var(--dark-color);
  background-image: url(../images/background.png);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  color: var(--white-color);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 600;
  color: var(--white-color);
}

a {
  color: var(--white-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-light-secondary {
  color: var(--light-secondary);
}

.letter-space {
  letter-spacing: 3px;
}

/* tsParticles background */
#tsparticles {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* Sections sit above particles */
section, nav, footer {
  position: relative;
  z-index: 1;
}

/* ============================================
   Padding Helpers
   ============================================ */
.padding-side {
  padding-left: 6rem;
  padding-right: 6rem;
}

.padding-large {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

@media (max-width: 991px) {
  .padding-side {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .padding-large {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  background: transparent;
  transition: all 0.4s ease;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.navbar.scrolled {
  background: rgba(15, 14, 16, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.navbar-brand {
  font-size: 1.8rem;
  color: var(--white-color) !important;
  letter-spacing: 2px;
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  margin-left: 1.5rem;
  position: relative;
  padding: 0.5rem 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.navbar-toggler {
  border: none;
  color: var(--white-color);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(15, 14, 16, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-top: 1rem;
  }
  .navbar-nav .nav-link {
    margin-left: 0;
    padding: 0.75rem 0;
  }
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-image-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid rgba(102, 253, 15, 0.3);
  transition: all 0.5s ease;
}

.hero-border {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border: 2px dashed rgba(102, 253, 15, 0.4);
  border-radius: 50%;
  animation: rotate-border 20s linear infinite;
}

@keyframes rotate-border {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.typed-text {
  color: var(--primary-color);
}

.cursor {
  display: inline-block;
  width: 3px;
  background: var(--primary-color);
  animation: blink 1s infinite;
  margin-left: 4px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.social-link {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white-color);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--dark-color);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--light-secondary);
  animation: bounce 2s infinite;
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--light-secondary);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--light-secondary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
  0% { top: 8px; opacity: 1; }
  100% { top: 24px; opacity: 0; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: var(--dark-color);
  font-weight: 600;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: transparent;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102,253,15,0.2);
}

.btn-outline-light {
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white-color);
  font-weight: 600;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: transparent;
  transform: translateY(-2px);
}

/* ============================================
   About Section
   ============================================ */
.about-img-wrapper {
  position: relative;
}

.about-img {
  width: 100%;
  border: 2px solid var(--border-color);
  transition: all 0.5s ease;
}

.about-img:hover {
  transform: scale(1.02);
  border-color: rgba(102,253,15,0.3);
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--primary-color);
  color: var(--dark-color);
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(102,253,15,0.3);
}

.icon-box {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(102,253,15,0.1);
  border-radius: 12px;
  flex-shrink: 0;
}

/* ============================================
   Timeline
   ============================================ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), rgba(102,253,15,0.1));
}

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

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

.timeline-marker {
  position: absolute;
  left: 14px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dark-color);
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(102,253,15,0.4);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.2);
  box-shadow: 0 0 25px rgba(102,253,15,0.6);
}

.timeline-content {
  background: var(--dark-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: rgba(102,253,15,0.3);
  transform: translateX(5px);
}

.timeline-date {
  display: inline-block;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-skill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(102,253,15,0.1);
  color: var(--primary-color);
  border: 1px solid rgba(102,253,15,0.2);
  transition: all 0.3s ease;
}

.badge-skill:hover {
  background: var(--primary-color);
  color: var(--dark-color);
}

/* ============================================
   Skills
   ============================================ */
.skill-card {
  background: var(--dark-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.4s ease;
}

.skill-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 20px rgba(102,253,15,0.1);
}

.skill-icon {
  font-size: 2.2rem;
  display: block;
}

/* ============================================
   Education
   ============================================ */
.edu-card {
  background: var(--dark-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.edu-card:hover {
  border-color: rgba(102,253,15,0.3);
  transform: translateY(-5px);
}

.edu-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(102,253,15,0.1);
  border-radius: 14px;
  flex-shrink: 0;
}

/* ============================================
   Contact
   ============================================ */
.contact-info {
  background: var(--dark-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.contact-info:hover {
  border-color: rgba(102,253,15,0.3);
  transform: translateY(-3px);
}

.contact-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(102,253,15,0.1);
  border-radius: 14px;
  flex-shrink: 0;
}

.hobbies-card {
  background: var(--dark-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border-color);
}

.social-link-small {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--light-secondary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-link-small:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--dark-color);
}

/* ============================================
   Back to top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: var(--dark-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(102,253,15,0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  color: var(--dark-color);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767px) {
  .hero-image-wrapper {
    width: 220px;
    height: 220px;
  }
  .display-2 {
    font-size: 2.5rem;
  }
  .display-5 {
    font-size: 2rem;
  }
  .experience-badge {
    right: -10px;
    bottom: -10px;
    padding: 1rem 1.25rem;
  }
  .experience-badge .display-4 {
    font-size: 2rem;
  }
  .timeline::before {
    left: 14px;
  }
  .timeline-item {
    padding-left: 50px;
  }
  .timeline-marker {
    left: 4px;
    width: 20px;
    height: 20px;
  }
}

/* Reveal animations fallback when JS disabled */
[data-aos] {
  opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--dark-color);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}
