/* Basic layout reset */
* {
    box-sizing: border-box;
}

/* Root variables */
:root {
    /* Accessible palette tuned for contrast (WCAG AA) and color vision deficiencies */
    --surface: #f4f6fb;
    --surface-strong: #0f172a;
    --text-primary: #101828;
    --text-muted: #475467;
    --border: #2b548b;
    --accent: #0ea5e9; /* bright teal-blue, passes on dark/light */
    --accent-strong: #0284c7;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #232946; /* Contrasting dark blue background */
    color: var(--text-primary);
    padding-bottom: 1rem;
}

#back-button {
    background-color: #0F4761;
    color: white;
    border: none;
    padding: 1rem;
    margin: 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

footer {
    background: rgba(15, 23, 42, 0.82); /* semi-transparent, matches --surface-strong */
    color: #d5dce7;
    text-align: center;
    padding-top: 0.7rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    flex-direction: column;
}

footer a {
    color: #38bdf8;
    text-decoration: underline;
    transition: color 0.2s;
}

footer a:hover {
    color: #fff;
}

footer-watermark {
    color: #a0aec0;
    font-size: 0.75rem;
}

header {
    background: var(--surface-strong);
    position: sticky;
    top: 0;
    z-index: 1000;
}

h1 {
    margin: 0 0 0.5rem;
    padding: 0.5em 0.25em 0.25em 0.75em;
    padding-left: 0.25rem;
}

h2 {
    margin: 0 0 0.5rem;
    padding: 0.5em 0.25em 0.25em 0.75em;
    padding-left: 0.75rem;
}

h3 {
    margin: 0 0 0.5rem;
    padding: 0.5em 0.25em 0.25em 0.75em;
    padding-left: 1.25rem;
}

h4 {
    margin: 0 0 0.5rem;
    padding: 0.5em 0.25em 0.25em 0.75em;
    padding-left: 1.5rem;
}

img {
    display: block;
    margin: 0 auto;
}

main {
    width: 85%;
    margin: 1rem auto;
    padding: 2.5%;
    padding-top: 0%;
    padding-bottom: 2%;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

nav {
    position: sticky;
    top: 0;
    z-index: 1001;
}

nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 1.15rem;
    padding: 0.35rem 0.6rem;
    transition: color 160ms ease, background-color 160ms ease;
}

nav a:hover {
    color: var(--accent);
    background-color: rgba(14, 165, 233, 0.12);
}

nav a.nav-disabled {
    color: #94a3b8;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background: none;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 1rem;
}

p, ul {
    margin-top: 0;
    text-align: justify;
    text-indent: 1em;
}



.tools-rating-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 1em;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #bdbdbd;
}

.tools-rating-table td {
    padding: 0.7em 0.5em;
    text-align: center;
    border: 1px solid #bdbdbd;
    vertical-align: top;
    background: #fff;
    font-weight: 400;
    transition: none;
    color: #222;
    border-right: 1px solid #bdbdbd;
}

.tools-rating-table td:last-child {
    border-right: 1px solid #bdbdbd;
}

.tools-rating-table th {
    padding: 0.7em 0.5em;
    text-align: center;
    border: 1px solid #bdbdbd;
    vertical-align: top;
    background: #f3f3f3;
    font-weight: 600;
    color: #222;
    font-size: 1.7em;
    border-bottom: 2px solid #bdbdbd;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.generic-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 1em;
    border-radius: 4px;
    overflow: hidden;
    /* border: 1px solid #bdbdbd; */
    margin: 0 auto 2em auto;
}

.generic-table th,
.generic-table td {
    padding: 0.7em 0.5em;
    text-align: left;
    border: 1px solid #bdbdbd;
    vertical-align: top;
    color: #222;
}

.generic-table th {
    background: #f3f3f3;
    font-weight: 600;
    border-bottom: 2px solid #bdbdbd;
}

.generic-table tr:last-child td {
    border-bottom: 1px solid #bdbdbd;
}

.tools-rating-table th .star {
    font-size: 0.8em;
    margin: 0 0.05em;
    vertical-align: middle;
    font-family: 'Segoe UI Symbol', 'Arial', sans-serif;
}

.tools-rating-table th .star.empty {
    color: #fff;
    -webkit-text-stroke: 1px #111;
    text-shadow: none;
}

.tools-rating-table th .star.filled {
    color: #111;
    text-shadow: none;
    -webkit-text-stroke: 1px #111;
}

.tools-rating-table tr:last-child td {
    border-bottom: 1px solid #bdbdbd;
}

.tools-rating-table-container {
    max-width: 700px;
    margin: 0 auto 2em auto;
    background: none;
    border-radius: 6px;
    box-shadow: none;
    padding: 0;
}

.contact-email-box {
    max-width: 400px;
    margin: 2.5em auto 1.5em auto;
    padding: 2em 2em 1.5em 2em;
    background: #f7f7fa;
    border-radius: 14px;
    text-align: center;
    font-size: 1.13em;
}

#captcha-submit {
    margin-left: 0.7em;
}

#footer-container {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    pointer-events: none;
}

#footer-container footer {
    pointer-events: auto;
}


/* Add responsive table styling */
.resume-table, .tools-rating-table, .generic-table {
    width: 100%; /* Ensure tables take up full width of the container */
    overflow-x: auto; /* Enable horizontal scrolling for smaller screens */
    display: block; /* Make tables block-level elements for better responsiveness */
}

.resume-table th, .resume-table td, .tools-rating-table th, .tools-rating-table td, .generic-table th, .generic-table td {
    word-wrap: break-word; /* Prevent content from overflowing */
    white-space: normal; /* Allow text to wrap within cells */
}

.resume-table thead, .tools-rating-table thead, .generic-table thead {
    display: table-header-group; /* Ensure headers remain visible */
}

.resume-table tbody, .tools-rating-table tbody, .generic-table tbody {
    display: table-row-group; /* Ensure rows stack properly */
}