:root {
  --bg-base: #f5f5f5;
  --bg-mantle: #fafafa;
  --bg-surface: #f0f0f0;

  --text-main: #333333;
  --text-sub: #777777;

  --accent-primary: #555555;
  --accent-secondary: #666666;
  --accent-highlight: #555555;

  --danger: #555555;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

html {
  scroll-padding-top: 100px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Work Sans', sans-serif;
  color: var(--accent-primary);
}

.lead,
.text-muted {
  color: var(--text-sub) !important;
}

.btn-submit {
  background-color: #fafafa;
  color: #555555;
  border: 1.5px solid #ccc;
  padding: 0.75rem 2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 50px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-submit:hover {
  background-color: var(--text-main);
  color: var(--bg-base);
}

.btn-outline-custom {
  color: #555555;
  border: 1.5px solid #ccc;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-custom:hover {
  background-color: var(--text-main);
  color: var(--bg-base);
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.form-control {
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background-color: #fafafa;
  color: #333333;
}

.form-control:focus {
  border-color: var(--text-main);
  background-color: var(--bg-mantle);
  color: var(--text-main);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-sub);
  opacity: 0.6;
}

.modal-content {
  background-color: #fafafa;
  color: #333333;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-header {
  border-bottom: 1px solid var(--bg-mantle);
}

.modal-footer {
  border-top: 1px solid var(--bg-mantle);
}

.section-padding {
  padding: 10rem 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--accent-primary);
  z-index: 20;
}

.section-title::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background-color: var(--text-main);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.navbar-custom {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transform: translate3d(0, 0, 0);
  transition: all 0.3s ease;
}

@media (min-width: 992px) {
  .navbar-custom {
    top: 20px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    width: 92%;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.08);
  }
}

.navbar-custom .navbar-brand {
  font-family: 'Work Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #555555;
}

.navbar-custom .nav-link {
  color: var(--text-sub) !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 0.5rem;
  padding: 0.6rem 1.2rem !important;
  border-radius: 30px;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--bg-base) !important;
  background-color: var(--accent-primary);
  color: #fff !important;
}

.navbar-toggler {
  border: none;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  padding: 0.5rem;
}

.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(85, 85, 85, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.jumbotron {
  background: linear-gradient(135deg, var(--bg-mantle), var(--bg-base));
  padding-top: 8rem;
  padding-bottom: 0;
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.jumbotron .hero-title,
.jumbotron .hero-subtitle,
.jumbotron img {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 5.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text-main);
  position: relative;
  z-index: 10;
}

.hero-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: var(--accent-primary);
  margin-bottom: 4rem;
}

#about {
  background-color: var(--bg-base);
}

.about-content {
  z-index: 10 !important;
  position: relative;
}

.badge-elegance {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--accent-primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.text-gradient {
  background: linear-gradient(45deg, #555555, #777777);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.about-img-container {
  z-index: 10 !important;
}

.about-frame {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-secondary);
  border-radius: 0.5rem;
  z-index: -1;
}

.stat-box {
  padding: 1rem;
  border-left: 3px solid var(--bg-surface);
}

.text-primary-custom {
  color: var(--accent-primary);
}

#skills {
  background-color: var(--bg-mantle);
}

.skill-card {
  background-color: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.skill-card:hover {
  border-color: var(--accent-secondary);
}

.skill-card .icon-box {
  color: var(--accent-primary);
}

.skill-icon {
  font-size: 3rem;
  color: var(--text-sub);
}

#projects {
  background-color: var(--bg-base) !important;
}

.project-card {
  background-color: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card[data-bs-toggle="modal"] {
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--accent-primary);
}

.project-card .card-title {
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.project-card .card-text {
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-card .position-relative {
  height: 250px;
  overflow: hidden;
}

.project-card img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: top;
}

.mobile-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-surface);
  padding: 20px;
}

.mobile-img {
  max-width: 100%;
  max-height: 500px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 4px solid #e0e0e0;
}

@media (max-width: 576px) {
  .mobile-img {
    max-height: 400px;
  }
  
  .mobile-preview-container {
    padding: 10px;
  }
}

.hover-opacity-100 {
  opacity: 1 !important;
}

.transition-opacity {
  transition: opacity 0.3s ease;
}

#education {
  background-color: var(--bg-mantle);
}

.resume-item {
  padding: 0 0 30px 25px;
  border-left: 2px solid var(--accent-secondary);
  position: relative;
  margin-left: 15px;
}

.resume-item:last-child {
  padding-bottom: 0;
  border-left: 2px solid transparent;
}

.resume-item::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  left: -9px;
  top: 0;
  background: var(--bg-mantle);
  border: 2px solid var(--accent-secondary);
  z-index: 1;
}

.resume-title {
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.resume-period {
  display: inline-block;
  background: var(--bg-surface);
  color: var(--text-sub);
  font-size: 0.85rem;
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.resume-company {
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 5px;
}

.resume-period + .resume-company {
  display: block;
}

.resume-desc {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.6;
}

#experience {
  background-color: var(--bg-base);
}

.experience-card {
  background-color: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.experience-card:hover {
  border-color: var(--accent-primary);
}

.experience-badge {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 1rem;
}

.experience-card h4 {
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.experience-card .company-name {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: block;
}

.experience-card p {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

#contact {
  background-color: var(--bg-mantle);
}

.contact-logo-box {
  display: inline-block;
  margin-bottom: 2rem;
}

.contact-icons a {
  color: var(--text-sub);
  transition: color 0.3s ease;
  display: inline-block;
}

.contact-icons a:hover {
  color: var(--accent-primary);
}

.contact-icons i {
  font-size: 3rem;
}

.footer {
  background-color: var(--bg-mantle);
  color: var(--text-sub);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer a:hover {
  color: var(--accent-primary) !important;
  text-decoration: underline;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: #555555;
  background-size: 60% 60%;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.carousel-indicators button {
  background-color: var(--accent-primary);
  opacity: 0.5;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--text-main);
  margin: 0 4px;
}

.carousel-indicators button.active {
  background-color: var(--text-main);
  opacity: 1;
}

.tech-stack-icons {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tech-stack-icons i {
  font-size: 1.5rem;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.tech-stack-icons i:hover {
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section-padding {
    padding: 4rem 0 8rem 0;
  }
}
