/*======================================================
  Custom enhancements (added on top of the template)
  - subtle, professional motion & polish
  - keep all bespoke styles here so the template files
    (style.css / default.css) stay untouched
======================================================*/

/* Fix: kill the tiny horizontal scroll on mobile caused by
   Bootstrap .row negative margins extending past the viewport */
html,
body {
    overflow-x: hidden;
}

/*------------------------------------------------------
  Reusable animated gradient text
------------------------------------------------------*/
.grad-text {
    background: linear-gradient(90deg, #5e2ced, #a531e0, #ff5b94, #5e2ced);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-content-right {
    opacity: 0;
    transform: translateY(24px);
    animation: heroIn 0.9s ease forwards 0.2s;
}

@keyframes heroIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Typing subtitle */
#typed-roles {
    display: inline;
}

.typed-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    background: currentColor;
    transform: translateY(2px);
    animation: caretBlink 0.8s steps(1) infinite;
}

@keyframes caretBlink {
    50% { opacity: 0; }
}

/*------------------------------------------------------
  Scroll reveal (class added by custom.js)
------------------------------------------------------*/
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/*------------------------------------------------------
  Card hover polish (skills + experience)
------------------------------------------------------*/
.single-skill,
#experience .card.shadow {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-skill:hover,
#experience .card.shadow:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(94, 44, 237, 0.15);
}

/*------------------------------------------------------
  Portfolio: glassmorphism cards
------------------------------------------------------*/
.pf-card {
    position: relative;
    margin-top: 30px;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #11112a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.pf-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 50px rgba(94, 44, 237, 0.25);
}

.pf-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* dark scrim so the glass panel + text stay readable on any image */
.pf-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 24, 0.78) 0%, rgba(8, 8, 24, 0.15) 45%, rgba(8, 8, 24, 0) 70%);
    pointer-events: none;
    transition: opacity 0.35s ease;
}

/* frosted glass info panel */
.pf-glass {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(23, 20, 45, 0.42);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-align: left;
    transition: transform 0.35s ease;
}

.pf-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* action row: revealed/expanded on hover */
.pf-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.pf-card:hover .pf-actions {
    max-height: 60px;
    opacity: 1;
    margin-top: 12px;
}

.pf-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    transition: transform 0.25s ease, background 0.25s ease;
}

.pf-actions .pf-preview {
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pf-actions .pf-preview:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px);
}

.pf-actions .pf-go {
    padding: 9px 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #5e2ced, #a531e0);
    box-shadow: 0 6px 16px rgba(94, 44, 237, 0.4);
}

.pf-actions .pf-go:hover {
    transform: translateX(3px);
}

/* touch / no-hover devices and small screens: always show the actions */
@media (hover: none), (max-width: 991px) {
    .pf-actions {
        max-height: 60px;
        opacity: 1;
        margin-top: 12px;
    }
}

/*------------------------------------------------------
  Portfolio: collapse extra works behind a toggle
------------------------------------------------------*/
.work-hidden {
    display: none;
}

.work-hidden.show-anim {
    display: block;
    animation: workIn 0.5s ease forwards;
}

@keyframes workIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

#work-toggle {
    cursor: pointer;
}

.work-more .github-more {
    display: inline-block;
    margin-top: 18px;
    color: #777;
    transition: color 0.25s ease;
}

.work-more .github-more:hover {
    color: #5e2ced;
}

/*------------------------------------------------------
  Section subtitle (shared by About / Skill / Experience)
------------------------------------------------------*/
.section-title p {
    color: #8a8fb0;
    margin-top: 14px;
    font-size: 15px;
}

/*------------------------------------------------------
  About: name accent + contact info chips
------------------------------------------------------*/
.about-content .about-title {
    position: relative;
    padding-left: 18px;
    font-weight: 700;
    margin-bottom: 22px;
}

.about-content .about-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg, #5e2ced, #ff5b94);
}

.about-content ul.clearfix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 34px;
    padding: 0;
    list-style: none;
}

.about-content ul.clearfix li {
    float: none;
    width: auto;
    list-style: none;
    margin: 0;
}

.about-content .single-info {
    min-width: 0;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ececf4;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-content .info-text {
    min-width: 0;
}

.about-content .info-text p {
    word-break: break-word;
}

@media (max-width: 575px) {
    .about-content ul.clearfix {
        grid-template-columns: 1fr;
    }
}

.about-content .single-info:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(94, 44, 237, 0.12);
}

.about-content .info-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 14px;
    background: linear-gradient(135deg, #3a14a0, #6d1bb0);
    box-shadow: 0 6px 14px rgba(58, 20, 160, 0.35);
}

.about-content .single-info .info-icon i {
    color: #fff !important;
    font-size: 23px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.about-content .info-text p {
    margin: 0;
    color: #555;
    font-weight: 500;
}

/*------------------------------------------------------
  Skill: gradient icon badge + tag chips
------------------------------------------------------*/
.single-skill {
    padding: 38px 26px 34px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eef0f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.single-skill .skill-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #5e2ced, #a531e0);
    box-shadow: 0 10px 24px rgba(94, 44, 237, 0.35);
}

.single-skill .skill-icon i {
    font-size: 32px;
    color: #fff;
}

.single-skill .skill-title {
    font-weight: 700;
}

.single-skill hr {
    width: 50px;
    height: 3px;
    border: none;
    border-radius: 3px;
    background: linear-gradient(90deg, #5e2ced, #ff5b94);
    margin: 12px auto 20px;
    opacity: 1;
}

/* Tech logo wall: brand logos in a responsive grid */
.skill-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 14px 6px 12px;
    border-radius: 14px;
    background: #faf9ff;
    border: 1px solid #eceaf6;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.logo-item:hover {
    transform: translateY(-4px);
    border-color: #d8d0f5;
    box-shadow: 0 10px 22px rgba(94, 44, 237, 0.14);
}

.logo-item i {
    font-size: 30px;
    line-height: 1;
    height: 32px;
    display: flex;
    align-items: center;
}

.logo-item .logo-img {
    height: 22px;
    width: auto;
    max-width: 56px;
    margin: 5px 0;
    object-fit: contain;
}

/* GitHub / Unity logos are dark monochrome — nudge to brand neutral */
.logo-item .devicon-github-original::before,
.logo-item .devicon-unity-original::before {
    color: #24292f;
}

.logo-item span:last-child {
    font-size: 11px;
    font-weight: 600;
    color: #5b5b76;
    text-align: center;
    line-height: 1.25;
}

/* Monogram fallback for techs without a brand logo */
.mono-badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #6d28d9, #9333ea);
    letter-spacing: -0.3px;
}

.mono-badge.office-w { background: linear-gradient(135deg, #1b4ca1, #2b6fd6); }
.mono-badge.office-x { background: linear-gradient(135deg, #1d7a45, #2aa765); }
.mono-badge.office-p { background: linear-gradient(135deg, #c43e1c, #e06236); }
.mono-badge.mono-dark { background: linear-gradient(135deg, #20232a, #3b3f47); }

@media (max-width: 480px) {
    .skill-logos {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*------------------------------------------------------
  Experience: timeline accent + tag chips
------------------------------------------------------*/
#experience .card.radius-15 {
    position: relative;
    border: none;
    border-radius: 16px !important;
    overflow: hidden;
}

#experience .card.radius-15::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #5e2ced, #ff5b94);
}

#experience .card .card-title {
    color: #1f1f3a !important;
    font-weight: 700;
}

#experience .card .float-end {
    color: #5e2ced !important;
    font-weight: 600;
}

#experience .badge {
    background: linear-gradient(135deg, #5e2ced, #a531e0) !important;
    color: #fff !important;
    font-size: 10px;
    padding: 7px 8px;
    border-radius: 999px;
    border: none !important;
    white-space: nowrap;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

#experience .border-end {
    border-color: rgba(94, 44, 237, 0.25) !important;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.exp-tags span {
    font-size: 12px;
    font-weight: 600;
    color: #5e2ced;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(94, 44, 237, 0.08);
    border: 1px solid rgba(94, 44, 237, 0.18);
}

/*------------------------------------------------------
  Respect reduced-motion preference
------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .header-content-right,
    .grad-text,
    .work-hidden.show-anim {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}
