body {
    background-color: #0a0a0a;
    color: #e5e5e5;
    font-size: 25px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* CV content area padding - not nav */
#cv-root {
    padding: 25px;
}

/* Reset nav font size to prevent wrapping */
nav {
    font-size: 16px !important;
}

nav a,
nav button,
nav div {
    font-size: inherit;
}

.dark-mode {
    background-color: #e8e8e8;
    color: #2a2a2a;
}

.light-mode {
    background-color: #e8e8e8;
    color: #2a2a2a;
}

/* Reset default browser styles for basic elements only */
#cv-root p,
#cv-root h1,
#cv-root h2,
#cv-root h3,
#cv-root h4,
#cv-root h5,
#cv-root h6,
#cv-root ul,
#cv-root li {
    margin: 0;
    padding: 0;
    text-indent: 0;
}

h1 {
    font-family: monospace;
    font-style: normal;
    font-weight: bold;
    text-decoration: none;
    font-size: 14pt;
}

.heading1 {
    padding-top: 0pt;
    padding-bottom: 2pt;
    padding-left: 6pt;
    text-indent: 0pt;
    text-align: left;
}

.heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.heading-row .heading1 {
    flex: 1 1 auto;
    margin: 0;
}

.heading-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn-link {
    border: none;
    background: none;
    color: var(--accent, #00ff41);
    font-family: 'Space Mono', monospace;
    font-size: 11pt;
    cursor: pointer;
    padding: 6pt 4pt;
    text-decoration: underline;
    transition: all 0.25s ease;
    position: relative;
}

.btn-link:hover,
.btn-link:focus {
    text-decoration: none;
    color: #00ff41;
    background: rgba(0, 255, 65, 0.15);
    border-radius: 3px;
}

body.light-mode .btn-link {
    color: var(--accent-light, #006a0d);
}

body.light-mode .btn-link:hover,
body.light-mode .btn-link:focus {
    color: #fff;
    background: var(--accent-light, #006a0d);
    border-radius: 3px;
}

.heading-row .btn-link {
    align-self: center;
}

/* Hide auth-required elements (Edit links) by default - shown via JS when authenticated */
.auth-required {
    display: none !important;
}

.auth-required.visible {
    display: inline-block !important;
}
}

hr {
    margin-top: 2px;
    margin-bottom: 10px;
}

p {
    font-family: monospace;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    font-size: 12pt;
    margin: 0pt;
}

h2 {
    font-family: monospace;
    font-style: normal;
    font-weight: bold;
    text-decoration: none;
    font-size: 12pt;
}

.s1 {
    font-family: monospace;
    font-style: italic;
    font-weight: normal;
    text-decoration: none;
    font-size: 12pt;
    color: var(--accent, #00ff41);
}

body.light-mode .s1 {
    color: var(--accent-light, #006a0d);
}

.profile-name {
    color: var(--accent, #00ff41);
}

body.light-mode .profile-name {
    color: var(--accent-light, #006a0d);
}

.s2 {
    color: var(--accent, #00ff41);
    font-family: monospace;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    font-size: 12pt;
}

    body.light-mode .s2 {
        color: var(--accent-light, #006a0d);
    }

.s3 {
    font-family: monospace;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    font-size: 12pt;
}

.a {
    font-family: monospace;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    font-size: 12pt;
}

.job {
    padding-top: 10pt;
    padding-left: 14pt;
    text-indent: -8pt;
    text-align: left;
}

.experience-item {
    margin-bottom: 16pt;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.experience-summary {
    cursor: pointer;
    padding: 12pt 16pt;
    display: flex;
    align-items: center;
    font-size: 12pt;
    font-weight: 600;
    flex-wrap: wrap;
    gap: 4pt 8pt;
}

.experience-summary i {
    font-style: normal;
    color: var(--accent, #00ff41);
    font-size: 11pt;
    font-weight: 500;
}

body.light-mode .experience-summary i {
    color: var(--accent-light, #006a0d);
}

.experience-summary::marker {
    font-size: 10pt;
}

.experience-content {
    padding: 12pt 16pt;
    font-size: 10pt;
    font-weight: 400;
}

.experience-content > div {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 8pt;
}

body.dark-mode .experience-item {
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .experience-item {
    border-color: rgba(0, 0, 0, 0.4);
}

/* Skills table styling */
#cv-root table h2 {
    font-size: 12pt !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

#cv-root table td {
    font-size: 12pt;
    padding: 8pt 6pt;
    vertical-align: top;
    line-height: 1.4;
}

/* Contact table in header - center it */
#cv-root table:first-of-type {
    width: auto;
    margin: 0 auto 16pt auto;
}

#cv-root table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 16pt;
}

/* General h2 styling for sections (education, certifications, etc.) */
#cv-root h2 {
    font-size: 12pt;
    font-weight: 600;
    line-height: 1.4;
}

/* General paragraph styling for sections (languages, references, etc.) */
#cv-root > div > p,
#cv-root > div > div > p {
    font-size: 12pt;
    line-height: 1.4;
}

.editor-controls {
    margin-top: 20pt;
    display: flex;
    justify-content: flex-end;
}

.editor-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 999;
    overflow-y: auto;
    box-sizing: border-box;
}

.editor-controls .btn-primary {
    padding: 6pt 12pt;
    border-radius: 4px;
    border: 1px solid var(--accent, #00ff41);
    background: transparent;
    color: var(--accent, #00ff41);
    font-family: monospace;
    font-size: 11pt;
    cursor: pointer;
}

.editor-controls .btn-primary:hover,
.editor-controls .btn-primary:focus {
    background: rgba(0, 255, 65, 0.15);
}

body.light-mode .editor-controls .btn-primary {
    color: var(--accent-light, #006a0d);
    border-color: var(--accent-light, #006a0d);
}

body.light-mode .editor-controls .btn-primary:hover,
body.light-mode .editor-controls .btn-primary:focus {
    background: rgba(0, 106, 13, 0.2);
}

.editor-panel {
    width: min(720px, 90vw);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 18pt;
    background-color: rgba(6, 12, 20, 0.92);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
    max-height: 85vh;
    overflow-y: auto;
}

.editor-panel h2 {
    margin-bottom: 8pt;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 12pt;
}

.editor-section {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 12pt;
    background-color: rgba(0, 0, 0, 0.35);
}

.editor-section-target {
    border-color: rgba(92, 157, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(92, 157, 255, 0.35);
}

.editor-section-title {
    margin: 0 0 8pt;
    font-size: 14pt;
    font-family: monospace;
    letter-spacing: 0.5pt;
}

.editor-field {
    display: flex;
    flex-direction: column;
    gap: 4pt;
    margin-top: 8pt;
}

.editor-field:first-of-type {
    margin-top: 0;
}

.editor-label {
    font-size: 9pt;
    letter-spacing: 0.5pt;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.editor-input {
    width: 100%;
    padding: 6pt 8pt;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: rgba(0, 0, 0, 0.4);
    color: inherit;
    font-family: monospace;
    font-size: 10pt;
    box-sizing: border-box;
}

.editor-input:focus {
    outline: none;
    border-color: var(--accent, #00ff41);
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.4);
}

textarea.editor-input {
    resize: vertical;
}

.editor-collection,
.editor-subcollection {
    display: flex;
    flex-direction: column;
    gap: 12pt;
    margin-top: 12pt;
}

.editor-item,
.editor-subitem {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 12pt;
    background-color: rgba(0, 0, 0, 0.25);
}

.editor-subheading {
    margin-top: 12pt;
    margin-bottom: 4pt;
    font-size: 11pt;
    letter-spacing: 0.5pt;
}

.editor-add,
.editor-remove {
    margin-top: 12pt;
    padding: 6pt 12pt;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: monospace;
    font-size: 10pt;
    align-self: flex-start;
}

.editor-add:hover,
.editor-add:focus,
.editor-remove:hover,
.editor-remove:focus {
    background: rgba(255, 255, 255, 0.1);
}

.editor-add {
    border-color: rgba(0, 255, 65, 0.7);
    color: var(--accent, #00ff41);
}

.editor-remove {
    border-color: rgba(255, 107, 107, 0.7);
    color: #ff6b6b;
}

.editor-add-nested {
    margin-top: 8pt;
}

.editor-subcollection .editor-remove {
    margin-top: 8pt;
}

.editor-actions {
    display: flex;
    gap: 8pt;
    margin-top: 10pt;
}

.editor-actions button {
    padding: 6pt 12pt;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: monospace;
}

.editor-actions button:hover,
.editor-actions button:focus {
    background: rgba(255, 255, 255, 0.1);
}

.editor-message {
    margin-top: 8pt;
    font-size: 10pt;
}

.editor-message.error {
    color: #ff6b6b;
}

.editor-message.success {
    color: #55d6a3;
}

.hidden {
    display: none !important;
}

.dark-mode .editor-overlay {
    background-color: rgba(0, 0, 0, 0.75);
}

.dark-mode .editor-panel {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
    color: rgb(34, 34, 34);
}

.dark-mode .editor-controls .btn-primary {
    border-color: rgb(46, 46, 46);
    color: rgb(46, 46, 46);
}

.dark-mode .editor-controls .btn-primary:hover,
.dark-mode .editor-controls .btn-primary:focus {
    background: rgba(46, 46, 46, 0.1);
}

.dark-mode .editor-section {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.15);
}

.dark-mode .editor-section-target {
    border-color: rgba(43, 95, 167, 0.8);
    box-shadow: 0 0 0 1px rgba(43, 95, 167, 0.35);
}

.dark-mode .editor-item,
.dark-mode .editor-subitem {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
}

.dark-mode .editor-label {
    color: rgba(46, 46, 46, 0.7);
}

.dark-mode .editor-input {
    background-color: rgba(255, 255, 255, 0.95);
    color: rgb(46, 46, 46);
    border-color: rgba(0, 0, 0, 0.2);
}

.dark-mode .editor-add,
.dark-mode .editor-remove {
    border-color: rgba(46, 46, 46, 0.3);
    color: rgb(46, 46, 46);
}

.dark-mode .editor-remove {
    border-color: rgba(255, 107, 107, 0.6);
    color: #c44b4b;
}

.dark-mode .editor-add {
    border-color: rgba(92, 157, 255, 0.6);
    color: #2b5fa7;
}

.dark-mode .editor-add:hover,
.dark-mode .editor-add:focus,
.dark-mode .editor-remove:hover,
.dark-mode .editor-remove:focus {
    background: rgba(46, 46, 46, 0.08);
}

.dark-mode .editor-actions button {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgb(46, 46, 46);
}
.job-items {
    padding-left: 50px;
    text-indent: -1.3em;
    text-align: left;
}

.sub-job-items {
    padding-left: 100px;
    text-indent: -1.3em;
    text-align: left;
}

.job-resp {
    padding-top: 5pt;
    padding-left: 14pt;
    text-indent: 0pt;
    text-align: left;
}

.cert-title {
    padding-top: 8pt;
    padding-left: 6pt;
    text-indent: 0pt;
    text-align: left;
    font-size: 12pt;
    font-weight: 600;
}

.cert-detail {
    padding-top: 2pt;
    padding-left: 10pt;
    text-indent: 0pt;
    text-align: left;
    font-style: italic;
    font-size: 12pt;
}

table {
    border-collapse: collapse;
    table-layout: auto;
}

table td {
    border: solid 1px rgba(255, 255, 255);
    word-wrap: break-word;
    text-indent: 3px;
    padding-left: 3px;
    padding-right: 3px;
}

.make-right {
    text-align: right;
}

.connect-details {
    text-indent: 10pt;
    line-height: 16pt;
    text-align: left;
    color: #717171;
    font-size: 15pt;
}

/* Theme Toggle Button with Moon/Sun Icons */
.theme-toggle {
    background: transparent;
    border: 1px solid #00ff41;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.3);
}

.theme-icon {
    position: absolute;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.theme-icon.sun {
    opacity: 0;
}

.theme-toggle.light-mode {
    border-color: #006a0d;
}

.theme-toggle.light-mode:hover {
    background: rgba(0, 106, 13, 0.1);
    box-shadow: 0 0 12px rgba(0, 106, 13, 0.3);
}

.theme-toggle.light-mode .theme-icon.moon {
    opacity: 0;
}

.theme-toggle.light-mode .theme-icon.sun {
    opacity: 1;
}

body.light-mode .theme-toggle {
    border-color: #006a0d;
}

body.light-mode .theme-toggle:hover {
    background: rgba(0, 106, 13, 0.1);
    box-shadow: 0 0 12px rgba(0, 106, 13, 0.3);
}

/* Legacy switch styles (keeping for backward compatibility if needed) */

/* Light Mode - Additional styles for detailed page */
body.light-mode p,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode li,
body.light-mode span {
    color: #2a2a2a;
}

body.light-mode hr {
    border-color: #cccccc;
}

body.light-mode a {
    color: #006a0d;
}

body.light-mode a:hover {
    color: #004a08;
}

body.light-mode .btn-link {
    color: #006a0d;
}

body.light-mode .btn-link:hover,
body.light-mode .btn-link:focus {
    color: #00ff41;
}

body.light-mode .edit-button {
    background: #f0f0f0;
    border-color: #cccccc;
    color: #006a0d;
}

body.light-mode .edit-button:hover {
    background: #006a0d;
    color: #fff;
}
