/* Enhanced Card UI */

.card {
    position: relative;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
    will-change: transform;
}

/* Animated gradient outline on hover */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.0) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.2) 70%,
        rgba(255, 255, 255, 0.0) 100%);
    background-size: 300% 300%;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    animation: card-border-pan 6s linear infinite paused;
}

.card:hover {
    transform: translateY(-6px);
    background: rgba(22, 22, 22, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

@keyframes card-border-pan {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtle reflection sheen that follows cursor */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.05) 0%,
        transparent 200px
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.card:hover::after {
    opacity: 1;
}

/* Icon container */
.card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.08) inset,
        0 4px 12px rgba(0, 0, 0, 0.4);
    color: #fff;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.card:hover .card-icon {
    transform: scale(1.08) rotate(-4deg);
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.15) inset,
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 24px -4px rgba(255, 255, 255, 0.15);
}

.card-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-desc {
    color: rgba(229, 231, 235, 0.75);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

/* Tag pill */
.card-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    letter-spacing: 0.01em;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.card-tag:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Card link buttons */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.card-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.card-link .feather {
    width: 0.85rem;
    height: 0.85rem;
}

/* Skill card and project card both use the .card base */
.skill-card,
.project-card {
    /* inherits all .card styles via shared class on element */
}

/* Project card body */
.project-card .p-6 {
    position: relative;
    z-index: 1;
}

/* Contact form card */
.form-card {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 2.25rem;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Kill the browser autofill yellow/blue infill */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #101010 inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    transition: background-color 9999s ease-in-out 0s;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(229, 231, 235, 0.9);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.btn-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(180deg, #ffffff, #e5e5e5);
    color: #000;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        transparent 0%,
        transparent 30%,
        rgba(0, 0, 0, 0.08) 50%,
        transparent 70%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.btn-submit:hover::before {
    transform: translateX(100%);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-status {
    margin-top: 1rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.form-status.success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.form-status.error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.form-status.info {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Contact info row */
.contact-row {
    display: flex;
    align-items: flex-start;
    padding: 0.85rem;
    border-radius: 0.65rem;
    transition: background 0.25s ease;
}

.contact-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.contact-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Small "dot" status indicator */
.status-dot {
    height: 0.6rem;
    width: 0.6rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
