/* ==========================================================================
   Azurio & Modern Interactive Effects for Nakul Jindal Portfolio
   ========================================================================== */

:root {
  --primary-color: #16c97e;
  --primary-color-rgb: 22, 201, 126;
  --primary-glow: rgba(22, 201, 126, 0.4);
  --dark-bg: #0e0f11;
  --card-bg: #141518;
  --text-main: #ffffff;
  --text-muted: #8c8f94;
  --border-color: rgba(255, 255, 255, 0.08);
}

/* Global Reset: Remove Underlines & Default Blue/Styled Text from all Links */
a, a:hover, a:focus, a:active,
.copy a, .info-list a, .service-item a, .started-content a {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.copy a, .info-list a, .service-item .text a {
  color: inherit !important;
  transition: color 0.3s ease !important;
}

.copy a:hover, .info-list a:hover, .service-item .text a:hover {
  color: var(--primary-color) !important;
}

/* Targeted Text Alignment: Justify Major Body Paragraphs */
.about .desc p,
.resume-items .resume-item p,
.box-item .desc p,
.summary-p {
  text-align: justify !important;
  text-justify: inter-word !important;
  line-height: 1.65 !important;
}

/* Info List Details (Degree, Residence, Phone, Email) - Left Aligned */
.info-list,
.info-list ul,
.info-list ul li {
  text-align: left !important;
}

/* -------------------------------------------------------
   Hide Raw Typed.js Data Source Strings
   ------------------------------------------------------- */
.typing-subtitle,
.section.started .started-content .typing-subtitle,
.section.started .started-content .h-subtitle.typing-subtitle,
.h-subtitle.typing-subtitle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* -------------------------------------------------------
   Responsive Typing Subtitle - Prevent Overflow on Desktop & Mobile
   ------------------------------------------------------- */
.section.started .started-content .typed-subtitle,
.section.started.personal .started-content .typed-subtitle,
.typed-subtitle {
  display: inline-block !important;
  font-size: clamp(1.75rem, 3.6vw, 3.6rem) !important;
  line-height: 1.2 !important;
  max-width: min(900px, calc(100vw - 260px)) !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

@media (min-width: 1200px) {
  .section.started.personal .started-content .typed-subtitle {
    left: 20% !important;
    max-width: calc(80% - 180px) !important; /* Strictly prevents collision with right-fixed social icons */
    font-size: clamp(2.2rem, 3.5vw, 3.6rem) !important;
    line-height: 1.15 !important;
  }
}

@media (max-width: 1199px) and (min-width: 992px) {
  .section.started.personal .started-content .typed-subtitle {
    left: 50px !important;
    max-width: calc(100vw - 220px) !important;
    font-size: clamp(1.8rem, 3.6vw, 3rem) !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 991px) {
  .section.started .started-content .typed-subtitle,
  .section.started.personal .started-content .typed-subtitle {
    left: 30px !important;
    right: 30px !important;
    width: auto !important;
    max-width: calc(100vw - 60px) !important;
    font-size: clamp(1.3rem, 5vw, 2.2rem) !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
  }

  .section.started .started-content .h-title {
    font-size: clamp(1rem, 4.5vw, 1.8rem) !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Typed.js cursor also scales */
  .section.started .started-content .typed-cursor {
    font-size: inherit !important;
  }
}

/* Custom Hero Photo Framing & Size Fix */
.started.personal .started-content .logo,
.section.started .started-content .logo {
  background-size: cover !important;
  background-position: 50% 25% !important;
  background-repeat: no-repeat !important;
}

/* Custom Azurio Text Hover Animation (Letter Split & Roll) */
.azurio-roll {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  line-height: 1.1;
  position: relative;
  cursor: pointer;
}

.azurio-roll .roll-wrapper {
  display: inline-block;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.azurio-roll:hover .roll-wrapper {
  transform: translateY(-100%);
}

.azurio-roll .roll-text-orig,
.azurio-roll .roll-text-hover {
  display: block;
  white-space: nowrap;
}

.azurio-roll .roll-text-hover {
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--primary-color);
  text-shadow: 0 0 12px var(--primary-glow);
}

/* Magnetic Glowing Buttons */
.azurio-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none !important;
  z-index: 1;
}

.azurio-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--primary-color);
  z-index: -1;
  transition: width 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  border-radius: 30px;
}

.azurio-btn:hover {
  color: #000000 !important;
  border-color: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

.azurio-btn:hover::before {
  width: 100%;
}

/* Precise & High Performance Green Cursor Follower */
.cursor-follower {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 26px !important;
  height: 26px !important;
  background-color: var(--primary-color) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 999999 !important;
  opacity: 0.75 !important;
  margin-left: -13px !important;
  margin-top: -13px !important;
  transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease, opacity 0.25s ease !important;
  will-change: transform;
}

.cursor-follower.cursor-active {
  width: 48px !important;
  height: 48px !important;
  margin-left: -24px !important;
  margin-top: -24px !important;
  background-color: rgba(22, 201, 126, 0.25) !important;
  border: 1px solid var(--primary-color) !important;
  opacity: 0.9 !important;
}

/* Custom Tag Badges */
.tech-tag {
  display: inline-block;
  padding: 6px 14px;
  margin: 4px 6px 4px 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  font-size: 13px;
  color: #ffffff !important;
  transition: all 0.25s ease;
}

.tech-tag:hover {
  background: rgba(22, 201, 126, 0.2);
  border-color: var(--primary-color);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Works Filter Menu Styling */
.filter-menu {
  margin-bottom: 40px !important;
  text-align: left;
}

.filter-menu .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-menu .filters .btn-group {
  display: inline-block;
  margin: 0 !important;
}

.filter-menu .filters .btn-group label {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 22px !important;
  height: auto !important;
  line-height: 1.4 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.filter-menu .filters .btn-group label:hover,
.filter-menu .filters .btn-group label.glitch-effect,
.filter-menu .filters .btn-group input[type="radio"]:checked + label {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #000000 !important;
  box-shadow: 0 0 16px var(--primary-glow) !important;
}

.filter-menu .filters .btn-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Contacts Form & Card Enhancements */
.contact_form.content-box {
  padding: 35px !important;
}

.contact_form .group-val input,
.contact_form .group-val textarea {
  width: 100% !important;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  padding: 14px 18px !important;
  font-size: 14px !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.contact_form .group-val input:focus,
.contact_form .group-val textarea:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 12px var(--primary-glow) !important;
  outline: none !important;
}

.service-items {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 25px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.service-items .service-col {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.service-items .service-col .content-box,
.service-items .service-col:nth-child(odd) .content-box,
.service-items .service-col:nth-child(even) .content-box {
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.service-items .service-item {
  height: 100% !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 768px) {
  .service-items {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Card Glow Effect on Hover */
.service-item, .resume-item, .works-item, .info-list li {
  transition: all 0.3s ease;
  border-radius: 8px;
}

.service-item:hover, .resume-item:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(22, 201, 126, 0.1);
  border-color: rgba(22, 201, 126, 0.3) !important;
}

/* Fixed Navigation Styling */
.header .top-menu .menu > li > a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  transition: color 0.3s ease;
}

.header .top-menu .menu > li.current-menu-item > a,
.header .top-menu .menu > li > a:hover {
  color: var(--primary-color) !important;
}

/* -------------------------------------------------------
   Mobile Right Offcanvas Sidebar - Independent Custom Drawer
   Completely decoupled from the theme's .top-menu element
   ------------------------------------------------------- */

/* Hide the native theme top-menu on mobile; replaced by #azurio-drawer */
@media (max-width: 991px) {
  .header .top-menu {
    display: none !important;
  }

  .header .menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    top: 22px !important;
    right: 22px !important;
    z-index: 999990 !important;
    cursor: pointer !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(20, 21, 24, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .header.active {
    background: transparent !important;
  }
}

/* Backdrop */
#azurio-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#azurio-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drawer Panel */
#azurio-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 290px;
  max-width: 85vw;
  height: 100%;
  background: #0e0f11;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.9);
  z-index: 999999;
  padding: 30px 24px 30px;
  box-sizing: border-box;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
#azurio-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

#azurio-drawer a:hover {
  color: #16c97e !important;
  transform: translateX(4px);
}

/* Info List Details - Left Aligned */
.info-list,
.info-list ul,
.info-list ul li {
  text-align: left !important;
}

/* SEO Heading Hierarchy Helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Optimizations */
@media (max-width: 991px) {
  .started-layout .started-image-p {
    max-width: 100%;
    margin: 0 auto 30px auto;
  }
}
