/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background-color: #f9faf3;
    --border-color: #4d5f66;
    --glow-color: rgba(77, 95, 102, 0.6);
    --tooltip-bg: rgba(77, 95, 102, 0.9);
    --tooltip-text: #ffffff;
}

html {
    font-size: 16px;
    font-family: 'Dosis', 'Open Sans', sans-serif;
    height: 100%;
}

body {
    background-color: var(--background-color);
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

main {
    width: 100%;
    padding-bottom: 3rem; /* Match the height of the footer */
}

.card-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 2rem;
}

.business-card {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 10cm;
    margin: 0 auto;
    /* Initial state for JS animation */
    opacity: 1;
    will-change: opacity, box-shadow;
    transition: box-shadow 0.3s ease-in-out;
}

/* Hover effects for the business card - blurry glow effect */
.card-container a:hover .business-card,
.card-container a:focus .business-card {
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 0 10px var(--glow-color),
        0 0 25px var(--glow-color);
}

/* Tooltip styling */
.tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent var(--tooltip-bg) transparent;
}

.card-container a:hover .tooltip,
.card-container a:focus .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Media query for screens where width is greater than 10cm */
@media screen and (min-width: 10cm) {
    .business-card {
        width: 10cm;
        margin: 0 auto;
    }
}

/* Accessibility focus styles */
a:focus {
    outline: 3px solid var(--border-color);
    outline-offset: 5px;
}

/* Ensure the image is not draggable for better UX */
img {
    -webkit-user-drag: none;
    user-select: none;
}

/* Bank details styling */
.bank-details {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    padding: 0.5rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bank-details p {
    color: var(--border-color);
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(0.5rem, 2vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.introduction {
    max-width: 10cm;
    margin: 0 auto 2rem auto;
    padding: 0 0.2rem;
    text-align: justify;
    hyphens: auto;
    font-family: 'Dosis', serif;
    color: var(--border-color);
}

.introduction .word {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.introduction .phonetic {
    font-style: italic;
    font-weight: normal;
}

.introduction .definition {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.introduction .experience {
    font-size: 1rem;
    line-height: 1.6;
}

