/* =========================
   Reset / Base
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background: #e9eaee;
    color: #111;
}

img {
    max-width: 100%;
    display: block;
} 

a {
    color: #3364b7;
    text-decoration: none;
    transition: 0.3s ease;
}

a:hover,
a:focus {
    text-decoration: underline;
}

.valid {
    white-space: nowrap;
}

/* =========================
   Layout
========================= */
.site-main {
    flex: 1;
    width: 100%;
    padding: 2rem 0 3rem;
}

.site-container {
    width: min(1400px, calc(100% - 2rem));
    margin: 0 auto;
}

/* =========================
   Header / Navigation
========================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #1e3a6d;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 88px;
    padding: 0.75rem 0;
}

.site-branding {
    flex: 0 0 auto;
}

.site-branding a {
    display: inline-block;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.05;
    background: none;
    text-decoration: none;
}

.site-branding a:hover,
.site-branding a:focus {
    color: #dce8ff;
    background: none;
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    position: relative;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;

    list-style: none;
    margin: 0;
    padding: 0;

    /* IMPORTANT */
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a,
.drop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.75rem 1rem;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus,
.drop-btn:hover,
.drop-btn:focus,
.has-dropdown:hover > .drop-btn,
.has-dropdown:focus-within > .drop-btn,
.has-dropdown.open > .drop-btn {
    background: #3364b7;
    color: #fff;
    text-decoration: none;
}

.dropdown-menu {
    list-style: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 220px;
    padding: 0.4rem 0;
    background: #264f99;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
    display: none;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    background: transparent;
    white-space: nowrap;
    text-decoration: none;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
    background: #3364b7;
    color: #fff;
    text-decoration: none;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.has-dropdown.open .dropdown-menu {
    display: block;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
    content: "";
    position: absolute;
    left: 10px;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 999px;
    transition: 0.3s ease;
}

.nav-toggle span {
    top: 20px;
}

.nav-toggle::before {
    top: 12px;
}

.nav-toggle::after {
    top: 28px;
}

.nav-toggle.active span {
    opacity: 0;
}

.nav-toggle.active::before {
    top: 20px;
    transform: rotate(45deg);
}

.nav-toggle.active::after {
    top: 20px;
    transform: rotate(-45deg);
}

/* =========================
   Typography / Content
========================= */
.content {
    margin: 0 0 1.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.heading {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    line-height: 1.2;
    text-align: center;
    padding-left: 3px;
    border-bottom: 1px solid #0c3781;
    color: #104aad;
    background-color: #fff;
}

.content-section {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.content-section h3 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.35rem;
    line-height: 1.3;
    text-align: left;
    padding-left: 3px;
    border-bottom: 1px solid #0c3781;
    color: #213f8c;
    background-color: #fff;
}

.content-section p,
.content-section li {
    font-size: 1.1rem;
    max-width: 70ch;
    overflow-wrap: break-word;
}

.content-section p {
    margin: 0 0 1rem;
}

.content-section ul {
    margin: 0 0 1.25rem 1.25rem;
}

/* =========================
   Hero / Cards
========================= */
.hero {
    background: linear-gradient(135deg, #dfe9f8, #ffffff);
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #1e3a6d;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 700px;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.hero-actions,
.content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.card {
    flex: 1 1 300px;
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.card h2 {
    margin-bottom: 0.75rem;
    color: #1e3a6d;
    font-size: 1.3rem;
}

/* =========================
   Buttons
========================= */
.button,
.boldbuttons,
.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3364b7;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #3364b7;
    cursor: pointer;
    transition: 0.25s ease;
}

.button {
    padding: 0.85rem 1.25rem;
    border-radius: 0.5rem;
}

.boldbuttons {
    padding: 0.55rem 1rem;
    border-radius: 999px;
}

.submit-button {
    min-width: 140px;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font: inherit;
    text-transform: capitalize;
}

.button:hover,
.button:focus,
.boldbuttons:hover,
.boldbuttons:focus,
.submit-button:hover,
.submit-button:focus {
    background: #254d93;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.button.secondary {
    background: #fff;
    color: #3364b7;
}

.button.secondary:hover,
.button.secondary:focus {
    background: #3364b7;
    color: #fff;
}

.buttonwrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* =========================
   CV Page
========================= */
.cv-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cv-title {
    text-align: center;
    color: #3364b7;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.cv-nav {
    list-style: none;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: center;
    background: #f5f8ff;
    border: 1px solid #d7e2f5;
    border-radius: 12px;
}

.cv-nav a {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    color: #3364b7;
    font-weight: 600;
    background: #fff;
    border: 1px solid #c9d8f0;
}

.cv-nav a:hover,
.cv-nav a:focus {
    background: #3364b7;
    color: #fff;
    text-decoration: none;
}

.cv-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    scroll-margin-top: 100px;
}

.cv-section h3 {
    margin-bottom: 1rem;
    color: #3364b7;
    border-bottom: 2px solid #3364b7;
    padding-bottom: 0.5rem;
}

.cv-section p,
.job p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.cv-list {
    margin: 0 0 1rem 1.25rem;
}

.cv-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.job {
    margin-bottom: 1.5rem;
}

.cv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.cv-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid #d9d9d9;
    vertical-align: top;
}

.cv-table td:first-child {
    font-weight: 700;
    width: 30%;
}

/* =========================
   Contact Page
========================= */
.contact-page {
    padding: 3rem 0 4rem;
}

.contact-page .heading,
.contact-page p {
    margin-bottom: 1rem;
}

.contact-warning {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #f4f8ff;
    border: 1px solid #d8e4f8;
    border-left: 4px solid #3364b7;
    border-radius: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 820px;
    margin-top: 2rem;
}

.form-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.form-row label,
.form-spacer {
    flex: 0 0 180px;
    max-width: 180px;
    font-weight: 700;
    color: #3364b7;
    padding-top: 0.85rem;
}

.contact-field {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0.85rem 1rem;
    font: inherit;
    color: #000;
    background: #fff;
    border: 1px solid #cfd8ea;
    border-radius: 10px;
}

.contact-field:hover,
.contact-field:focus {
    border-color: #3364b7;
}

.contact-field:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 100, 183, 0.12);
}

.contact-textarea {
    min-height: 180px;
    resize: vertical;
}

.captcha-row label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.25rem;
}

.captcha-question {
    font-weight: 700;
    color: #000;
}

.captcha-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}

.captcha-wrap .contact-field {
    max-width: 220px;
}

/* =========================
   Jokes Page - Old Layout
========================= */
ul.jokes {
    margin-top: 2rem;
    list-style-type: none;
    padding-left: 80px;
}

ul.jokes li {
    margin-bottom: 0.35rem;
}

ul.jokes a {
    color: #3364b7;
    font-weight: 400;
}

ul.jokes a:hover,
ul.jokes a:focus {
    color: #3364b7;
    background: none;
    text-decoration: underline;
}

.jokes-page {
    padding: 0;
}

.jokes-layout,
.joke-card,
.joke-top {
    display: block;
}

.joke-card {
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
    scroll-margin-top: 100px;
}

.joke-top h3 {
    margin: 0;
    font-size: 120%;
    font-weight: bold;
    text-align: left;
    padding-left: 3px;
    border-bottom: 1px solid #0c3781;
    color: #213f8c;
    background-color: #fff;
    line-height: 1.3;
}

.joke-card p,
.joke-card li {
    margin-bottom: 1rem;
    line-height: 1.7;
    max-width: none;
}

.joke-card ol,
.joke-card ul {
    margin: 0 0 1rem 1.5rem;
}

/* =========================
   Other Lists
========================= */
ul.cv,
ul.links {
    list-style: none;
    margin-top: 2rem;
    padding-left: 0;
}

ul.smile {
    list-style-image: url("images/7.gif");
    padding-left: 2rem;
}

ul.frown {
    list-style-image: url("images/2.gif");
    padding-left: 2rem;
}

/* =========================
   Footer
========================= */

.footer-basic {
    background: #102b55;
    color: #fff;
    padding: 1rem 0;
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;

    /* keeps everything on one line */
    flex-wrap: nowrap;
}

/* =========================
   Footer Sections
========================= */

.footer-item {
    display: flex;
    align-items: center;
}

/* Left icons */
.footer-social-left {
    gap: 1rem;
}

/* Centre text */
.footer-copyright {
    flex: 1;
    justify-content: center;
    text-align: center;

    /* stops text breaking */
    white-space: nowrap;
}

/* Right links/icons */
.footer-valid {
    gap: 1rem;
    justify-content: flex-end;
}

/* =========================
   Links
========================= */

.footer-basic a {
    color: #fff;
    text-decoration: none;
}

.footer-basic a:hover {
    color: #dbe8ff;
}

/* =========================
   Social Icons
========================= */

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,0.08);

    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 10px rgba(255,255,255,0.4),
        0 0 20px rgba(255,255,255,0.3);
}

/* =========================
   Mobile
========================= */

@media (max-width: 860px) {

    .footer-wrap {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-copyright {
        white-space: normal;
        text-align: center;
    }
}

/* =========================
   3D Text
========================= */
.css-3d-text {
    margin: 0;
    font-size: 35px;
    color: #ffffff;
    font-family: "Arial Black", Gadget, sans-serif;
    text-shadow:
        0 0 0 rgb(245,245,245),
        -1px 1px 0 rgb(235,235,235),
        -2px 2px 0 rgb(225,225,225),
        -3px 3px 0 rgb(215,215,215),
        -4px 4px 0 rgb(205,205,205),
        -5px 5px 0 rgb(195,195,195),
        -6px 6px 5px rgba(0,0,0,0.6),
        -6px 6px 1px rgba(0,0,0,0.5),
        0 0 5px rgba(0,0,0,.2);
}

/* =========================
   Responsive
========================= */
@media (max-width: 860px) {
    .header-wrap {
        min-height: 72px;
    }

    .site-branding a {
        font-size: 1.8rem;
    }

    .nav-toggle {
        display: inline-block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        width: min(320px, calc(100vw - 2rem));
        background: #1e3a6d;
        border-radius: 12px;
        overflow: hidden;
        z-index: 9999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu > li > a,
    .drop-btn {
        width: 100%;
        justify-content: space-between;
        border-radius: 0;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 100%;
        padding: 0;
        margin: 0;
        background: #264f99;
        box-shadow: none;
        border: 0;
        border-radius: 0;
    }

    .has-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding-left: 2rem;
    }

    .site-main {
        padding: 1.25rem 0 2rem;
    }

    .site-container {
        width: min(100%, calc(100% - 1rem));
    }

    .content-section,
    .cv-section,
    .joke-card {
        padding: 1rem;
    }

    .heading {
        font-size: 1.5rem;
    }

    .content-section h3,
    .joke-top h3 {
        font-size: 1.25rem;
    }

    .content-section p,
    .content-section li {
        font-size: 1rem;
        max-width: 100%;
    }

    ul.jokes {
        padding-left: 1.25rem;
    }

    .buttonwrapper {
        justify-content: flex-start;
    }

    .cv-table td,
    .cv-table tr {
        display: block;
        width: 100%;
    }

    .cv-table td:first-child {
        width: 100%;
        padding-bottom: 0.25rem;
        border-bottom: none;
    }

    .cv-table td:last-child {
        padding-top: 0;
    }

    .footer-wrap {
        flex-direction: column;
        text-align: center;
    }

    .footer-item,
    .footer-social-left,
    .footer-name,
    .footer-valid,
    .footer-social-right {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .hero {
        padding: 2rem 1.25rem;
    }

    .header-wrap {
        min-height: 64px;
    }
}