:root {
    --bg-body: #000000;
    --bg-paper: #121212;
    --text-main: #ffffff;
    --text-muted: #bebebe;
    --border: #333333;
    --text-highlight: #2ecc71;
    --title-orange: #ff9800;
    --table-header: #1a1a1a;
}

[data-theme="light"] {
    --bg-body: #e0e0e0;
    --bg-paper: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --border: #cccccc;
    --text-highlight: #0062d3;
    --title-orange: #ff9800;
    --table-header: #f3f4f6;
}
#theme-toggle { cursor: pointer; text-decoration: underline dotted; transition: color 0.3s ease; }
#theme-toggle:hover { color: var(--title-orange); }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Liberation Mono', 'Consolas', monospace;
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cv-container {
    width: 265mm;
    min-height: 300mm;
    background-color: var(--bg-paper);
    padding: 40px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border 0.3s ease;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 10px;
    margin-bottom: 5px;
    gap: 20px;
}

.header-left {
    flex: 1;
    padding-right: 20px;
}

.header-right {
    width: 180px;
    flex-shrink: 0;
}

.photo-box {
    position: relative;
    width: 180px; 
    height: 180px;
    overflow: hidden;
    border-radius: 10px;
}

.profile-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.main-img { z-index: 10; }

.flash-img { 
    z-index: 11;
    opacity: 0;
    animation: strobeSequence 30s linear infinite;
}

@keyframes strobeSequence {
    0%, 19.9% { opacity: 0; transform: scale(1); }
    20% { opacity: 1; transform: scale(1.02) translateX(-2px); } 
    20.3% { opacity: 0; }
    20.5% { opacity: 1; transform: scale(1.02) translateX(2px); }
    20.8% { opacity: 0; }
    21% { opacity: 1; transform: scale(1.05); }
    21.3% { opacity: 0; }
    21.5% { opacity: 1; transform: scale(1); } 
    24% { opacity: 1; transform: scale(1); }
    24.1%, 100% { opacity: 0; }
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.profile-summary {
    font-size: 11pt;
    line-height: 1.5;
    margin-top: 0;
    color: var(--text-muted);
}

.identity-block {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin-bottom: 15px;
}

h1 {
    margin: 0;
    font-size: 12pt;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    white-space: nowrap;
}

.role {
    flex: 1;
    text-align: right;
    font-size: 12pt;
    color: var(--text-main);
    font-weight: bold;
    font-style: italic;
    margin: 0;
    padding-right: 30px;
}

.intro {
    margin-bottom: 20px;
    font-size: 11pt;
    font-style: italic;
    color: var(--text-muted);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px 20px; 
    font-size: 11pt;
    color: var(--text-main);
}

.contact-grid div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-grid div:nth-child(even) {
    white-space: nowrap;
    overflow: visible;
    margin-right: 50px;
}

.contact-grid div:nth-child(odd) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

h2 {
    background-color: transparent;
    color: var(--title-orange);
    font-size: 11pt;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    padding: 10px 0;
    margin-top: 25px;
    margin-bottom: 15px;
    border-left: none;
    font-weight: bold;
}

.skills-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.skills-table th,
.skills-table td {
    border: 1px solid var(--border);
    padding: 8px;
    vertical-align: top;
    font-size: 11pt;
}
.skills-table th:nth-child(1), .skills-table td:nth-child(1) { width: 27%; }
.skills-table th:nth-child(2), .skills-table td:nth-child(2) { width: 31%; }
.skills-table th:nth-child(3), .skills-table td:nth-child(3) { width: 20%; }
.skills-table th:nth-child(4), .skills-table td:nth-child(4) { width: 22%; }

.skills-table th {
    text-align: left;
    background-color: #1a1a1a;
    color: var(--text-main);
}

.skills-table th {
    text-align: left;
    background-color: var(--table-header);
    color: var(--text-main);
}

.highlight {
    color: var(--text-highlight);
    font-weight: bold;
}

.encrypted-link {
    color: var(--bg-paper);
    font-weight: bold;
    background-color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
}
.encrypted-link:hover { color: var(--title-orange); }

.decrypted {
    color: var(--text-main);
    cursor: text;
    border-bottom: none;
}

.decrypted::after {
    content: "";
}

.entry {
    margin-bottom: 30px;
    page-break-inside: avoid;
}

.entry-header {
    display: flex;
    align-items: baseline;
    font-weight: bold;
    font-size: 11pt;
    margin-bottom: 2px;
}
.entry-header>span:last-child { margin-left: auto; }

.entry-subheader {
    font-weight: normal;
    font-size: 11pt;
    margin-left: 8px;
    margin-bottom: 0;
}

.entry ul {
    margin: 5px 0 0 0;
    padding: 0;
    font-size: 11pt;
    list-style: none;
}

.entry ul li {
    margin-bottom: 5px;
    color: var(--text-muted);
}

.entry-header>span:last-child {
    margin-left: auto;
    font-weight: normal;
}

.interests {
    font-size: 11pt;
    color: var(--text-muted);
}

.right { text-align: right; }

.bold { font-weight: bold; }

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text-highlight);
    cursor: pointer;
}

details > summary {
    list-style: none;
    cursor: pointer;
    outline: none;
    transition: color 0.2s ease;
}

details > summary::-webkit-details-marker { display: none; }

details > summary::before {
    content: "[+] ";
    color: var(--text-highlight);
    font-weight: bold;
    margin-right: 8px;
    display: inline-block;
    min-width: 30px;
}

details[open] > summary::before {
    content: "[-] ";
    color: var(--title-orange);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

summary.entry-header {
    display: flex; 
    align-items: baseline;
    width: 100%;
}

.modal {
    display: none;
    position: fixed; 
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-paper);
    margin: 10% auto;
    border: 1px solid var(--text-highlight);
    padding: 20px;
    width: 650px;
    text-align: center;
}

.nedry-gif {
    width: 100%;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
}

.terminal-text {
    color: var(--title-orange);
    font-weight: bold;
    text-align: left;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    background: #000;
    padding: 5px;
    border: 1px solid #333;
}

.prompt {
    color: var(--text-highlight);
    margin-right: 10px;
}

.input-group input {
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    width: 100%;
    outline: none;
}

.input-group button {
    background: var(--text-highlight);
    border: none;
    color: black;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
}

.input-group button:hover {
    background: white;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover { color: red; }