/* ==========================================================================
   Design Enhancements - Modern Portfolio Styling
   ========================================================================== */

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.8);
  --border-color: rgba(99, 102, 241, 0.2);
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;
}

/* --------------------------------------------------------------------------
   Background
   -------------------------------------------------------------------------- */
body {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #0c0a1d 100%) !important;
}

/* --------------------------------------------------------------------------
   Header/Sidebar
   -------------------------------------------------------------------------- */
.header {
  background: #0f172a !important;
  background-color: #0f172a !important;
  border-right: 1px solid var(--border-color) !important;
  min-height: 100% !important;
}

.page-content {
  background-color: #0f172a !important;
}

.header *,
.header-content,
.main-menu,
.main-menu ul,
.main-menu li,
.social-links,
.header-buttons,
.copyrights {
  background: transparent !important;
  background-color: transparent !important;
}

.header-photo img {
  border: 3px solid var(--primary) !important;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-photo img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.6);
}

.header-titles h2 {
  color: var(--text-light) !important;
}

.header-titles h4 {
  color: var(--primary-light) !important;
}

/* --------------------------------------------------------------------------
   Navigation - Safe styling (no pseudo-elements)
   -------------------------------------------------------------------------- */
.main-menu li a {
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent !important;
}

.main-menu li a:hover,
.main-menu li.active a,
.main-menu li a.active {
  background: transparent !important;
  border-left-color: var(--primary) !important;
}

.main-menu li a:hover .link-text,
.main-menu li.active a .link-text,
.main-menu li a.active .link-text {
  color: var(--primary-light) !important;
}

/* --------------------------------------------------------------------------
   Social Links
   -------------------------------------------------------------------------- */
.social-links ul li a {
  background: rgba(99, 102, 241, 0.1) !important;
  border: 1px solid var(--border-color) !important;
  transition: all 0.3s ease;
}

.social-links ul li a:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* --------------------------------------------------------------------------
   Content Sections
   -------------------------------------------------------------------------- */
.animated-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%) !important;
  border: 1px solid var(--border-color) !important;
}

/* --------------------------------------------------------------------------
   Page Titles
   -------------------------------------------------------------------------- */
.page-title h2 {
  color: var(--text-light) !important;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.page-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
}

.block-title h3 {
  color: var(--text-light) !important;
}

.block-title h3 span {
  color: var(--primary-light) !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary,
.button,
input[type="submit"] {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover,
.button:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%) !important;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.info-block-w-icon,
.fun-fact,
.lm-info-block,
.certificate-item,
.blog-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  transition: all 0.3s ease;
}

.youtube-feed .blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.youtube-feed .blog-card .media-block {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
}

.youtube-feed .blog-card .media-block img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-feed .blog-card .post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.youtube-feed > [class*="col-"] {
  margin-bottom: 24px;
}

.contact-cards .col-xs-12 {
  display: flex;
}

.contact-cards .lm-info-block {
  width: 100%;
  height: 100%;
}

.info-block-w-icon {
  padding: 25px !important;
  margin-bottom: 20px !important;
  min-height: 140px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.info-block-w-icon .ci-icon {
  flex-shrink: 0;
}

.info-block-w-icon .ci-icon i {
  font-size: 2.5rem;
  color: var(--primary-light) !important;
}

.info-block-w-icon .ci-text h4 {
  margin-bottom: 8px;
  color: var(--text-light) !important;
}

.info-block-w-icon .ci-text p {
  color: var(--text-muted) !important;
  margin: 0;
}

.info-block-w-icon:hover,
.fun-fact:hover,
.lm-info-block:hover,
.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.1);
}

.fun-fact {
  background: var(--bg-card) !important;
}

.fun-fact i {
  color: var(--primary-light) !important;
  transition: transform 0.3s ease;
}

.fun-fact:hover i {
  transform: scale(1.2);
}

.fun-fact-block-value {
  color: var(--text-light) !important;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline-second-style .timeline-item .left-part {
  border-right-color: var(--border-color) !important;
}

.timeline-second-style .item-period {
  color: var(--primary-light) !important;
}

.timeline-second-style .divider {
  border-color: var(--border-color) !important;
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */
.skill-container {
  background: rgba(99, 102, 241, 0.1) !important;
  border-radius: 10px !important;
}

.skill-percentage {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%) !important;
  border-radius: 10px !important;
}

.skill-value {
  color: var(--primary-light) !important;
}

.skill h4 {
  color: var(--text-light) !important;
}

/* --------------------------------------------------------------------------
   Knowledge Tags
   -------------------------------------------------------------------------- */
ul.knowledges li {
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 20px !important;
  color: var(--text-muted) !important;
  transition: all 0.3s ease;
}

ul.knowledges li:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-control {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  color: var(--text-light) !important;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* --------------------------------------------------------------------------
   Info List
   -------------------------------------------------------------------------- */
.info-list ul li .title {
  color: var(--text-muted) !important;
}

.info-list ul li .value {
  color: var(--text-light) !important;
}

.info-list ul li .value a {
  color: var(--primary-light) !important;
}

/* --------------------------------------------------------------------------
   Home Page Title
   -------------------------------------------------------------------------- */
.start-page .title-block h2 {
  font-size: 2.8rem !important;
  color: var(--text-light) !important;
}

.sp-subtitle {
  color: var(--primary-light) !important;
  font-size: 1.2rem;
}

/* --------------------------------------------------------------------------
   Certificate
   -------------------------------------------------------------------------- */
.certificate-item .certi-logo img {
  border-radius: 8px;
}

.certi-title h4 {
  color: var(--text-light) !important;
}

.certi-date span,
.certi-id span {
  color: var(--text-muted) !important;
}

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

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

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

/* --------------------------------------------------------------------------
   Text Selection
   -------------------------------------------------------------------------- */
::selection {
  background: var(--primary);
  color: white;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a {
  color: var(--primary-light);
}

a:hover {
  color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   Copyrights
   -------------------------------------------------------------------------- */
.copyrights {
  color: var(--text-muted) !important;
}

/* --------------------------------------------------------------------------
   Download CV Button
   -------------------------------------------------------------------------- */
.header-buttons .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%) !important;
}

/* --------------------------------------------------------------------------
   Home Page - Stats
   -------------------------------------------------------------------------- */
.home-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 25px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   Home Page - CTA Buttons
   -------------------------------------------------------------------------- */
.home-cta {
  text-align: center;
}

.home-cta .btn {
  margin: 5px 10px;
  padding: 14px 30px;
  font-weight: 500;
}

.btn-secondary {
  background: transparent !important;
  border: 2px solid var(--primary) !important;
  color: var(--primary-light) !important;
}

.btn-secondary:hover {
  background: var(--primary) !important;
  color: white !important;
}

.btn-outline {
  background: transparent !important;
  border: 2px solid var(--text-muted) !important;
  color: var(--text-muted) !important;
}

.btn-outline:hover {
  border-color: var(--accent) !important;
  color: var(--accent-light) !important;
}

/* --------------------------------------------------------------------------
   Home Page - Featured Work
   -------------------------------------------------------------------------- */
.featured-work {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.featured-work .col-xs-12.col-sm-6 {
  flex: 1 1 calc(50% - 10px);
  max-width: calc(50% - 10px);
  padding: 0 !important;
}

.featured-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
}

.featured-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.featured-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-placeholder i {
  font-size: 4rem;
  color: white;
}

.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.featured-info {
  padding: 20px;
}

.featured-info h4 {
  color: var(--text-light) !important;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.featured-info p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Home Page - Tech Stack
   -------------------------------------------------------------------------- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 25px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 100px;
}

.tech-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.tech-item i {
  font-size: 2rem;
  color: var(--primary-light);
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.tech-item:hover i {
  color: var(--accent-light);
  transform: scale(1.1);
}

.tech-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 767px) {
  .featured-work .col-xs-12.col-sm-6 {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .stat-number {
    font-size: 2rem;
  }

  .home-cta .btn {
    display: block;
    margin: 10px auto;
    max-width: 250px;
  }
}

/* --------------------------------------------------------------------------
   Courses Section
   -------------------------------------------------------------------------- */
.courses-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.courses-grid .col-xs-12.col-sm-6 {
  flex: 1 1 calc(50% - 10px);
  max-width: calc(50% - 10px);
  padding: 0 !important;
}

.course-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.course-card .media-block {
  flex-shrink: 0;
}

.course-card .media-block img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.course-card .post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px !important;
}

.course-card .post-info p {
  flex: 1;
  margin-bottom: 0;
}

.text-center {
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
}

.btn-lg {
  padding: 16px 40px !important;
  font-size: 1.1rem !important;
  display: inline-block !important;
}

@media (max-width: 767px) {
  .courses-grid .col-xs-12.col-sm-6 {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .header {
    background: rgba(15, 23, 42, 0.98) !important;
  }
}

@media (max-width: 768px) {
  .start-page .title-block h2 {
    font-size: 2rem !important;
  }

  .sp-subtitle {
    font-size: 1rem;
  }
}
