/* ================================================
 * Portfolio UI Enhancements
 * Custom improvements for Mohd Arif Khan's portfolio
 * ================================================ */

/* ------------------------------------------------
 * 2. Hero / Intro Section Enhancements
 * ------------------------------------------------ */

/* Subtle gradient overlay on the headline title for depth */
.headline__title {
  line-height: 1.08 !important;
  letter-spacing: -0.02em;
}

/* "Welcome!" pill — more refined */
.headline__subtitle {
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Headline buttons — tighter, more professional spacing */
.headline__btnholder {
  gap: 0.75rem;
  margin-top: 2.4rem;
}

/* ------------------------------------------------
 * 3. Portfolio Project Cards (Visual Placeholders)
 * ------------------------------------------------ */

/* Card visual: matches template card language (white bg, subtle border) */
.portfolio-card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--_radius-xl);
  background-color: var(--base);
  border: 1px solid var(--stroke-elements);
  transition:
    transform 0.3s cubic-bezier(0.23, 0.65, 0.74, 1.09),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* Orange top accent bar — matches the template's accent usage */
.portfolio-card-visual::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  z-index: 1;
}

/* Subtle background pattern — very light, stays in theme */
.portfolio-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 70% 80%,
    rgba(255, 140, 66, 0.05) 0%,
    transparent 60%
  );
  pointer-events: none;
}

/* All cards use the theme base color — no dark gradients */
.portfolio-card-visual--1,
.portfolio-card-visual--2,
.portfolio-card-visual--3,
.portfolio-card-visual--4 {
  background-color: var(--base);
}

/* Icon: orange circle container, matches tools-cards icon treatment */
.portfolio-card-icon {
  width: 6rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 140, 66, 0.1);
  border-radius: 50%;
  font-size: 2.8rem;
  color: var(--accent);
  z-index: 1;
  position: relative;
  transition:
    transform 0.35s cubic-bezier(0.23, 0.65, 0.74, 1.09),
    background 0.3s ease;
}

/* Category label: matches template's native rounded-tag pill style */
.portfolio-card-label {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  background: var(--base);
  color: var(--t-base);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  border: 1px solid var(--stroke-elements);
  z-index: 2;
}

/* ---- Portfolio card hover — mirrors tools-cards__card:hover exactly ---- */
.gallery__item {
  overflow: visible;
  transition: none;
}
.gallery__item:hover {
  z-index: 2;
}

/* Lift + accent border + orange shadow — same as tools cards */
.gallery__item:hover .portfolio-card-visual {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.15);
}

/* Icon scales up and background deepens on hover */
.gallery__item:hover .portfolio-card-icon {
  transform: translateY(-4px) scale(1.12);
  background: rgba(255, 140, 66, 0.18);
}

/* Figcaption: flow naturally BELOW the card visual */
.gallery__item .gallery__descr {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  padding: 1.6rem 0 0 !important;
  background: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  pointer-events: auto !important;
  display: block;
  z-index: auto;
}

/* Always show project title */
.gallery__item .gallery__descr h5,
.gallery__item .gallery__descr h5.opposite {
  display: block !important;
  color: var(--t-bright) !important;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  transition: color 0.25s ease;
}
.gallery__item:hover .gallery__descr h5,
.gallery__item:hover .gallery__descr h5.opposite {
  color: var(--t-accent) !important;
}

/* Tags always visible */
.gallery__item .gallery__descr .card__tags {
  margin-bottom: 0;
}
.gallery__item .gallery__descr .rounded-tag {
  font-size: 1.25rem;
  height: 2.8rem;
  padding: 0 1rem;
  margin: 0.3rem 0.5rem 0.3rem 0;
}

/* Description: hidden by default, fades in on hover */
.gallery__item .gallery__descr p.small {
  display: block !important;
  color: var(--t-base) !important;
  font-size: 1.35rem;
  line-height: 1.55;
  margin-top: 0.9rem;
  margin-bottom: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease;
}
.gallery__item:hover .gallery__descr p.small {
  max-height: 10rem;
  opacity: 0.78;
}

/* ------------------------------------------------
 * 4. Achievement Numbers — Gradient Text
 * ------------------------------------------------ */
.achievements__number {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* ------------------------------------------------
 * 5. Services Cards — Visual Upgrade
 * ------------------------------------------------ */

/* Accent left border on service card hover */
.cards__card {
  position: relative;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.23, 0.65, 0.74, 1.09) !important;
}

.cards__card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent) 0%, var(--secondary) 100%);
  opacity: 0;
  transform: scaleY(0.4);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.cards__item:hover .cards__card::after {
  opacity: 1;
  transform: scaleY(1);
}

/* ------------------------------------------------
 * 6. Resume / Experience Timeline
 * ------------------------------------------------ */

/* Company logo container — consistent sizing */
.company-logo {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  border-radius: 0.6rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke-elements);
  background: var(--base-tint);
  padding: 4px;
  transition: box-shadow 0.3s ease;
}

.resume-lines__item:hover .company-logo {
  box-shadow: 0 4px 16px rgba(var(--accent), 0.15);
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.4rem;
}

/* ------------------------------------------------
 * 7. Tech Stack Cards — Category Grouping
 * ------------------------------------------------ */

/* Subtle lift animation on tool cards */
.tools-cards__card {
  transition:
    transform 0.25s cubic-bezier(0.23, 0.65, 0.74, 1.09),
    box-shadow 0.25s ease !important;
}

.tools-cards__item:hover .tools-cards__card {
  transform: translateY(-4px);
}

/* ------------------------------------------------
 * 8. Section Headings — Underline Accent
 * ------------------------------------------------ */

/* Gradient underline on h2 titles */
.h2__title {
  position: relative;
}

/* ------------------------------------------------
 * 9. Contact Form — Input Focus States
 * ------------------------------------------------ */
.form-container .form input:focus,
.form-container .form textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

/* ------------------------------------------------
 * 10. Social Cards — Color on Hover
 * ------------------------------------------------ */
.socials-cards__card {
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.25s cubic-bezier(0.23, 0.65, 0.74, 1.09),
    box-shadow 0.25s ease !important;
}

.socials-cards__item:hover .socials-cards__card {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--secondary) 100%
  ) !important;
  color: #fff !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3) !important;
}

.socials-cards__item:hover .socials-cards__card i {
  color: #fff !important;
}

/* ------------------------------------------------
 * 11. "Let's Talk" CTA Button — Pulse Glow
 * ------------------------------------------------ */
.header__trigger {
  transition:
    box-shadow 0.3s ease,
    transform 0.2s ease !important;
}

.header__trigger:hover {
  box-shadow:
    0 0 0 4px rgba(255, 107, 53, 0.2),
    0 4px 20px rgba(255, 107, 53, 0.35) !important;
  transform: translateY(-1px);
}

/* ------------------------------------------------
 * 12. Testimonial Cards — Refined Border
 * ------------------------------------------------ */
.testimonials-card {
  border-left: 3px solid var(--accent);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.testimonials-card:hover {
  transform: translateY(-2px);
}

/* ------------------------------------------------
 * 13. About Page — Info Items Hover
 * ------------------------------------------------ */
.about-info__item {
  transition: padding-left 0.25s ease;
}

.about-info__item:hover {
  padding-left: 0.5rem;
}

.about-info__item:hover h6 {
  color: var(--t-accent);
}

/* ------------------------------------------------
 * 14. General Micro-Interactions
 * ------------------------------------------------ */

/* Rounded tags - slight lift on hover */
.rounded-tag {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.rounded-tag:hover {
  transform: translateY(-1px);
}

/* ------------------------------------------------
 * 15. Section First — Remove Top Spacing Issue
 * ------------------------------------------------ */
.inner-first {
  padding-top: 2rem;
}

/* ------------------------------------------------
 * 16. Dark Mode Overrides
 * ------------------------------------------------ */
[color-scheme="dark"] .availability-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

/* ------------------------------------------------
 * 17. Responsive Tweaks
 * ------------------------------------------------ */
@media (max-width: 768px) {
  .portfolio-card-icon {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 2.2rem;
  }

  .headline__btnholder {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .availability-badge {
    font-size: 0.72rem;
  }
}
