html {
    font-size: 1.2em;
    /*margin: 3em 0;*/
}

body {
    /*display: flex;*/
    /*display: block;*/
    justify-content: center;
    margin: 0 auto;
    font-family: Georgia, Times, "Times New Roman", serif;
}

main {
    padding-top: 60px; /* Default padding for mobile to account for fixed header */
}

section.doc, article {
    max-width: 700px;
    margin: 2em auto 0 auto;
}

p, blockquote {
    line-height: 1.4; /* Modify this value as needed */
}

a {
    color: #0077cc;
    text-decoration: none;
}

/*a:visited {
    color: #4c2c92;
}*/

a:not(.primary-button):not(.secondary-button):hover {
    /*color: #ff4500;*/
    text-decoration: underline;
}

/* Base styles for all sections */
section {
    width: 100%; /* Ensures the background color covers the full width of the viewport */
    padding: 0; /* Adds some spacing inside each section */
    box-sizing: border-box; /* Includes padding in the width calculation */
}

/* Container for content within sections */
.container {
    max-width: 900px; /* Maximum content width */
    margin: 0 auto; /* Centers the content block */
    padding: 0 20px; /* Optional: Adds horizontal padding inside the content container */
}

/* Hero section container - wider than standard container */

#hero .container {
    max-width: 70%; /* Make hero section wider (70% of viewport) */
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1 {
    font-size: 36px;
}

h3 {
    font-size: 22px;
    margin: 5px 0;
}

h3.abstract-title {
    font-size: 32px;
    margin: 5px 0;
    text-align: center;
}

h4 {
    font-size: 26px;
    margin: 1em 0 0.6em 0;
}

h1.role-book-title {
    /*margin: 0;
    color: red;*/
    display: none;
}

h1.role-chapter-title, h1.role-toc-title, h1.role-appendices-title {
    font-size: 32px;
    margin: 40px 0 5px 0;
}

h1.role-appendices-title {
    margin-bottom: 30px;
}

h1.role-toc-title {
    margin-bottom: 25px;
}

h2, h1.role-appendix-title {
    font-size: 28px;
    margin: 30px 0 15px 0;
    line-height: 1.4;
}

/* Cover and anbstract */

div.cover {
    text-align: center;
    margin-bottom: 2em;
}

div.cover h1 {
    font-size: 43px;
    line-height: 48px;
    margin: 1em 0;
    padding-bottom: 0;
    border-bottom-style: none;
}

div.cover h3 {
    font-size: 21px;
}

div.cover h2 {
    font-size: 28px;
}

div.abstract h3, div.abstract h4, .cover h3 {
    margin: 5px 0;
}

div.abstract h3 {
    margin: 3px 0;
    font-size: 26px
}

div.abstract p {
    margin: 3px 0;
}

div.abstract {
    text-align: center;
    /*margin-bottom: 4em;*/
}

div.abstract h1 {
    text-align: center;
    font-size: 38px;
    line-height: 42px;
    margin: 0.5em 0;
    padding-bottom: 0;
    border-bottom-style: none;
}

p.abstract-passage {
    font-size: 20.5px;
    line-height: 1.4em;
}

section#abstract h2 {
    display: none;

}

div.cover h4 {
    margin: 5px 0;
}

div.figure-parts-horizontal {
    display: flex;
    align-items: center;
}

div.figure-parts-horizontal div:nth-child(2) {
    margin: 0 1em;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-family: sans-serif;
    font-size: 20px;
}

table caption {
    text-align: left;
    margin: 1.5em 0 1.4em 0;
    font-style: italic;
    line-height: 1.5;
}

table tr:first-child {
    border-top: 1px solid black;

}

table tr:last-child {
    border-bottom: 1px solid black;

}

/*table td:first-child {
	padding-top: 0.5em;
}

table td:last-child {
	padding-bottom: 0.5em;
}*/

table ul, table ol {
    padding-left: 1em;
}

table > p {
    line-height: 1.2;
}

table ul {
    margin: 0 0;
}

thead tr th {
    padding: 0.5em 0.5em;
}

td {
    padding: 0.3em 10px 0.3em 10px;
    border: none;
}

th {
    font-weight: normal;
}

figcaption {
    /*font-size: smaller;*/
    font-style: italic;
    /*margin-bottom: 1em;*/
    margin: 1.1em 0 1.1em 0;
    line-height: 1.5;
}

/*@media (max-width: 960px) {
  body {
    max-width: none;
  }
}*/

li p {
    margin: 10px 0;
}

ul.role-booklist-entries li {
    margin: 15px 0;
    list-style-type: none;
}

ul.role-booklist-entries {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

ul.role-booklist-entries ul {
    padding-left: 30px;
}

.fixed-width {
    /* width: 20%; /* Adjusts each of the four columns to 20% of the table's width */
}

.line-above {
    border-top: 1px solid black;
}

figure {
    margin: 1.2em 0 1.2em 0;
}

.figure {
    margin-top: 1.5em;
}

p.figure-note {
    margin: 0.5em 0 0;
}

p.table-note {
    margin: 0 0 1.2em 0 !important;

}

.spacer td { /* add space between thead/tfoot and tbody */
    height: 0.1em; /* Adjust the height for desired spacing */
    background-color: transparent; /* Ensure the spacer row is invisible */
    border: none; /* Remove any border to make it seamless */
}

.table-small td {
    padding: 0.3em 10px;
}

/* ------------------------ home --------------------------------*/
#hero, #newsletters, footer {
    text-align: center;
    padding: 30px 0 0 0;
}

#hero {
    background: #f7f8f9;
    color: #333333;
    padding: 60px 0;
}

#hero a {
    color: #0077cc;
    text-decoration: none;
}

#hero a:not(.primary-button):not(.secondary-button):hover {
    text-decoration: underline;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hero-text {
    flex: 1;
    text-align: left;
    padding-right: 0;
    width: 50%;
    box-sizing: border-box;
}

.hero-text h1 {
    font-size: 46px;
    margin-bottom: 20px;
}

.hero-canvas {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    box-sizing: border-box;
    /*padding-right: 30px;*/
}

.hero-canvas canvas {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
    }

    .hero-text, .hero-canvas {
        width: 100%;
        padding-right: 0;
    }

    .hero-text {
        margin-bottom: 30px;
        order: -1; /* Move text upward */
    }

    .hero-canvas {
        order: 1; /* Move canvas downward */
    }

    .hero-canvas canvas {
        max-width: 100%;
        height: auto;
    }
}

#newsletters {
    background-color: #f7f8f9;
}

#newsletters h3 {
    margin-bottom: 0.5em;
}

.newsletter {
    display: inline-block; /* Aligns the newsletter content horizontally */
    max-width: 600px; /* Restrict width to manage space */
    box-sizing: border-box; /* Includes padding in width calculation */
    padding: 0;
    margin: 0;
}

/* --------- hamburger menu ------------ */
#nav-icon {
    /*padding: 14px 16px;*/
    cursor: pointer;
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1001; /* Higher than the menu-tray z-index */
    outline: none; /* Remove default outline */
    display: none; /* Hide by default for desktop */
}

/* Focus styles removed as requested, but consider adding alternative focus indicators for accessibility */
#nav-icon:focus {
    /* No focus styles as per client request */
}

#nav-icon span {
    display: block;
    width: 28px;
    height: 4px;
    background-color: #333333;
    margin-bottom: 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger menu animation when active */
#nav-icon.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: #333333;
}

#nav-icon.active span:nth-child(2) {
    opacity: 0;
}

#nav-icon.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: #333333;
}

/* Desktop menu styles */
#desktop-menu {
    display: flex;
    align-items: center;
}

#desktop-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#desktop-menu li {
    margin-right: 24px;
}

#desktop-menu a {
    display: block;
    color: #333333;
    padding: 10px 0;
    text-decoration: none;
    font-weight: bold;
}

#desktop-menu a:hover {
    color: #0077cc;
}

/* Primary button style used across the site */
.primary-button {
    background-color: #1F4AE7;
    color: white !important;
    padding: 10px 20px 10px 20px !important;
    border-radius: 20px;
    text-decoration: none;
    font-weight: normal !important;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.primary-button:hover {
    background-color: #1a3fc5;
    color: white !important;
}

/* Get started button extends primary button */
.get-started-btn {
    /* Inherits all styles from primary-button */
    /* margin-right: 16px; */
}

/* Secondary button style */
.secondary-button {
    background-color: white;
    color: #333333 !important;
    padding: 10px 20px 10px 20px !important;
    border-radius: 20px;
    text-decoration: none;
    font-weight: normal !important;
    transition: background-color 0.3s;
    border: 1px solid #333333;
    cursor: pointer;
    font-size: 16px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.secondary-button:hover {
    background-color: #f2f2f2;
    color: #333333 !important;
}

/* --------- Common Text Styles ----------- */
.standard-text-link {
    color: #333333;
    padding: 10px 0;
    text-decoration: none;
    font-size: 16px;
    display: block;
    font-weight: bold;
}

.standard-text-link:hover {
    color: #0077cc;
}

.heading-text {
    margin-bottom: 15px;
    font-weight: bold;
    color: #5a6978; /* Cold gray color */
}

/* --------- header ----------- */
header {
    background-color: rgba(255, 255, 255, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

header a {
    color: #333333;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 16px;
    display: inline;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 0;
    font-weight: bold;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    /* Default height for mobile */
    height: auto;
}

/* --------- nav menu ------------ */
#menu-tray {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.8s ease-out, opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    z-index: 1000;
}

#menu-tray:not([hidden]) {
    max-height: 100vh; /* Full viewport height */
    opacity: 1;
    transform: translateY(0);
}

#menu-tray ul {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

#menu-tray li {
    margin: 15px 0;
}

#menu-tray a {
    display: block;
    color: #000000;
    padding: 15px 16px;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

#menu-tray a:hover {
    color: #1F4AE7;
    transform: scale(1.05);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-content a {
    color: #1F4AE7;
    text-decoration: underline;
}

.cookie-content a:hover {
    text-decoration: none;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cookie-button.accept {
    background-color: #1F4AE7;
    color: white;
}

.cookie-button.accept:hover {
    background-color: #1a3fc5;
}

.cookie-button.decline {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.cookie-button.decline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
.site-footer {
    /*background-color: #f7f8f9;*/
    color: #333;
    padding: 40px 20px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.footer-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
    padding: 0;
    margin-left: -15px;
    margin-right: -15px;
}

.footer-column h3 {
    /* Apply the heading-text class styles */
    color: #99a5b6; /* Cold gray color */
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 16px; /* Same as links */
    padding: 0 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0 10px;
    margin: 0 0 15px 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    /* Apply the standard-text-link class styles */
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 0; /* Override the padding from standard-text-link for better footer layout */
    display: inline-block; /* Better for footer links than block display */
}

.footer-column a:hover {
    color: #0077cc;
}

.footer-column p {
    font-size: 16px; /* Same as links and column titles */
    margin: 0;
    padding: 0 10px;
    color: #333333; /* Same as links */
    font-weight: bold; /* Same as links */
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 0 10px;
}

.social-links img {
    transition: transform 0.3s ease;
}

.social-links img:hover {
    transform: scale(1.1);
}

/* Responsive footer */
@media screen and (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }

    .footer-column {
        width: 100%;
        margin-bottom: 30px;
    }
}

/* Linkedin button*/
.libutton {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    padding: 7px;
    text-align: center;
    outline: none;
    text-decoration: none !important;
    color: #ffffff !important;
    width: 200px;
    height: 32px;
    border-radius: 16px;
    background-color: #0A66C2;
    font-size: 0.8em;
    font-family: "SF Pro Text", Helvetica, sans-serif;
}

section#skills p {
    line-height: 2.2em;
    font-size: 0.8em;
    font-family: sans-serif;
}

section#skills span {
    background-color: #e6e6e6;
    padding: 0.3em 0.4em;
    margin: 0 0.1em;
    border-radius: 0.2em;

}

.experience-date {
    color: #9c9c9c;
    font-style: italic;
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 1em;
}

/* ------------------------ contact form --------------------------*/
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    /*font-weight: bold;*/
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form buttons without primary-button class will use this style */
.form-group button:not(.primary-button) {
    background-color: #0077cc;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.form-group button:not(.primary-button):hover {
    background-color: #005fa3;
}

.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.form-status.error {
    background-color: #ffebee;
    color: #c62828;
    display: block;
}

.form-status.sending {
    background-color: #e3f2fd;
    color: #0d47a1;
    display: block;
}

.form-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    display: block;
}

/* ------------------------ centered page --------------------------*/
.centered-page h1,
.centered-page > p {
    text-align: center;
}

.centered-page .contact-form {
    margin: 0 auto;
}

/* Form elements inside centered page remain left-aligned */
.centered-page .form-group label,
.centered-page .form-group button {
    text-align: left;
}

/* ------------------------ about page --------------------------*/
.about-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.about-column-left {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
}

.about-column-right {
    flex: 2;
    min-width: 300px;
}

.about-profile-image {
    width: 49%;
    border-radius: 50%;
    margin-bottom: 15px;
}

.about-social-links {
    margin-top: 15px;
}

/* Desktop header height */
@media screen and (min-width: 901px) {
    .top-bar {
        padding: 10px 40px; /* Increased horizontal padding for desktop (40px on both sides) */
        height: 70px; /* Increased height for desktop (approximately 20px more) */
    }

    main {
        padding-top: 90px; /* Increased padding for desktop to account for taller header */
    }
}


/* ------------------------ homepage services --------------------------*/
.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.service-block {
    background-color: #f7f8f9;
    border-radius: 10px;
    padding: 30px;
    width: calc(50% - 15px);
    min-width: 300px;
    box-sizing: border-box;
    text-align: center;
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #1F4AE7;
}

.service-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.service-description {
    margin-bottom: 25px;
    line-height: 1.5;
}

.services-cta {
    text-align: center;
    margin: 40px 0;
}

/* ------------------------ responsive --------------------------*/

/* Small screens (phones) */
@media screen and (max-width: 900px) {
    /* Navigation responsive styles */
    #desktop-menu {
        display: none; /* Hide desktop menu on mobile */
    }

    #nav-icon {
        display: block; /* Show hamburger menu on mobile */
    }

    /* Increase font size for mobile tray menu options */
    #menu-tray a {
        font-size: 30px;
    }

    /* Other responsive styles */
    .container, section.doc {
        /*width: 100%;*/
        padding: 10px;
    }

    /*main div {
        padding: 10px;
        margin: 5px 0;
    }*/
    .contact-form {
        max-width: 100%;
    }

    /* Center the left column (top block) in mobile view */
    .about-column-left {
        margin: 0 auto;
        text-align: center;
    }
}

/* Blog Article */

ul, ol {
    margin: 0.5em 0 0.5em 1.5em;
    padding-left: 0.15em;
    line-height: 1.4em;
    font-size: 1rem;
    color: #222;
}

li {
    margin-bottom: 0.5em;
}

/* Nested lists: slightly reduced spacing for structure */
ul ul, ol ol {
    margin-top: 0.2em;
    margin-bottom: 0.2em;
}

/* Code */


/* PrismJS 1.30.0
https://prismjs.com/download?utm_source=chatgpt.com#themes=prism-okaidia&languages=markup+css+clike+javascript+bash+python */
code[class*=language-], pre[class*=language-] {
    color: #f8f8f2;
    background: 0 0;
    text-shadow: 0 1px rgba(0, 0, 0, .3);
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none
}

pre[class*=language-] {
    padding: 0.7em;
    margin: 1.2em 0;
    overflow: auto;
    border-radius: .3em
}

:not(pre) > code[class*=language-], pre[class*=language-] {
    background: #272822
}

:not(pre) > code[class*=language-] {
    padding: .1em;
    border-radius: .3em;
    white-space: normal
}

.token.cdata, .token.comment, .token.doctype, .token.prolog {
    color: #8292a2
}

.token.punctuation {
    color: #f8f8f2
}

.token.namespace {
    opacity: .7
}

.token.constant, .token.deleted, .token.property, .token.symbol, .token.tag {
    color: #f92672
}

.token.boolean, .token.number {
    color: #ae81ff
}

.token.attr-name, .token.builtin, .token.char, .token.inserted, .token.selector, .token.string {
    color: #a6e22e
}

.language-css .token.string, .style .token.string, .token.entity, .token.operator, .token.url, .token.variable {
    color: #f8f8f2
}

.token.atrule, .token.attr-value, .token.class-name, .token.function {
    color: #e6db74
}

.token.keyword {
    color: #66d9ef
}

.token.important, .token.regex {
    color: #fd971f
}

.token.bold, .token.important {
    font-weight: 700
}

.token.italic {
    font-style: italic
}

.token.entity {
    cursor: help
}

/* KBD */
kbd {
    padding: 3px 5px;
    font-size: 0.74em;
    color: #f8f8f2;
    background-color: #272822;
    border-radius: 3px;

}

/* IMG */

img {
    max-width: 100%;
    height: auto;
}

/* For special thin images */
.thin-image {
    max-width: 700px;
    display: block;
    margin: 0 auto;
}
