/* --- CSS Variables for Theming --- */
:root {
    --bg-primary: #f5f5f5; /* Lighter Gray */
    --bg-secondary: #ffffff; /* white */
    --bg-tertiary: #eeeeee; /* Light Gray */
    --bg-tertiary-hover: #dddddd; /* Medium Light Gray */
    --text-primary: #222222; /* Dark Gray */
    --text-secondary: #111111; /* Near Black */
    --border-color: #eeeeee; /* Light Gray */
    --save-bg: #222222; /* Dark Gray */
    --save-text: #ffffff; /* white */
    --save-bg-hover: #333333; /* Darker Gray Hover */
    --focus-ring-color: #111111; /* black */
    --focus-ring-offset-color: #ffffff; /* white */
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111111; /* Near Black */
        --bg-secondary: #1c1c1c; /* Dark Gray */
        --bg-tertiary: #333333; /* Medium Dark Gray */
        --bg-tertiary-hover: #444444; /* Lighter Dark Gray */
        --text-primary: #f5f5f5; /* Off White */
        --text-secondary: #f5f5f5; /* Off White */
        --border-color: #333333; /* Medium Dark Gray */
        --save-bg: #dddddd; /* Light Gray */
        --save-text: #111111; /* Near Black */
        --save-bg-hover: #cccccc; /* Lighter Gray Hover */
        --focus-ring-color: #ffffff; /* white */
        --focus-ring-offset-color: #1c1c1c; /* Dark Gray */
    }
}

/* --- Base Styles --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.5s ease;
}

/* --- Card Styles --- */
.card-container {
    width: 100%;
    max-width: 24rem; /* 384px */
    background-color: var(--bg-secondary);
    border-radius: 1rem; /* 16px */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem; /* 32px */
    margin: 1rem; /* 16px */
    transition: background-color 0.5s ease, border-color 0.5s ease;
    border: 1px solid var(--border-color);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Profile Section --- */
.profile-picture {
    width: 10rem; /* Increased width for rectangular logo */
    height: auto; /* Auto height to maintain aspect ratio */
    border-radius: 0.5rem; /* Slightly rounded corners for the rectangle */
    object-fit: contain; /* Ensure the whole logo is visible */
    border: none; /* Removed the circular border */
    margin-bottom: 1rem; /* Added some space below the logo */
}

.profile-header {
    text-align: center;
    margin-top: 1rem; /* 16px */
}

.profile-name {
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* --- Links & Buttons --- */
.links-container {
    margin-top: 1.5rem; /* 24px */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 12px */
}

.contact-button {
    position: relative; /* Set position context for the icon */
    display: block; /* Use block display for consistent layout */
    text-align: center; /* Center the text content */
    width: 100%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem; /* 8px */
    transition: background-color 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-sizing: border-box;
}

.contact-button:hover {
    background-color: var(--bg-tertiary-hover);
}

.contact-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--focus-ring-offset-color), 0 0 0 4px var(--focus-ring-color);
}

.contact-button .icon {
    position: absolute; /* Position icon independently of text */
    left: 1rem; /* 16px from the left */
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem; /* 20px */
    height: 1.25rem; /* 20px */
}


/* --- Modal Styles --- */
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    width: 100%;
    max-width: 20rem;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    color: #aaaaaa; /* Medium Gray */
    font-size: 1.875rem; /* 30px */
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 9999px;
}

.modal-close:hover {
    color: var(--text-secondary);
}

.modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--focus-ring-color);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 12px */
}
