:root {
    /* Colors */
    --bg-color: #fcfcfc;
    --text-color: #1a1a1a;
    --accent-color: #2b6cb0; /* Deep Technical Blue */
    --line-color: #e0e0e0;
    --meta-color: #666666;
    --highlight-bg: #f0f4f8;
    
    /* Spacing */
    --grid-gap: 2rem;
    --section-pad: 6rem;
    --container-width: 1000px;
    
    /* Typography */
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Courier New", Courier, monospace;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* Notebook Mode (Default) Styling */
body[data-mode="notebook"] {
    --font-heading: var(--font-mono);
    --border-style: solid;
    background-image: linear-gradient(to right, transparent 95%, rgba(0,0,0,0.02) 95%);
    background-size: 20px 100%;
}

body[data-mode="presentation"] {
    --font-heading: var(--font-main);
    --border-style: none;
    --bg-color: #ffffff;
    --line-color: transparent;
    background-image: none;
}

/* Layout */
.content-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem 4rem 6rem; /* Left padding accommodates PFD */
    border-left: 1px dashed var(--line-color);
    min-height: 100vh;
}

.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--grid-gap);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading, var(--font-main));
    font-weight: 600;
    color: var(--text-color);
}

h1.name {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h2.section-title {
    font-size: 1.25rem;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p { margin-bottom: 1rem; max-width: 65ch; }

/* Reactor Scroll Indicator */
.reactor-level-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 300px;
    width: 6px;
    background: #eee;
    border-radius: 3px;
    z-index: 100;
}

.reactor-level-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--accent-color);
    height: 0%;
    transition: height 0.1s linear;
    border-radius: 3px;
}

.reactor-ticks {
    position: absolute;
    right: 12px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--meta-color);
    text-align: right;
    pointer-events: none;
}

/* PFD Navigation */
.pfd-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 600px;
    width: 120px;
    z-index: 100;
}

.pfd-svg {
    height: 100%;
    width: 100%;
    overflow: visible;
}

.pfd-line {
    fill: none;
    stroke: var(--line-color);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.pfd-node {
    cursor: pointer;
    transition: opacity 0.3s;
    opacity: 0.5;
}

.pfd-node:hover, .pfd-node.active {
    opacity: 1;
}

.pfd-node circle, .pfd-node rect, .pfd-node polygon {
    fill: var(--bg-color);
    stroke: var(--text-color);
    stroke-width: 1.5;
    transition: fill 0.3s, stroke 0.3s;
}

.pfd-node.active circle, .pfd-node.active rect, .pfd-node.active polygon {
    fill: var(--accent-color);
    stroke: var(--accent-color);
}

.pfd-label {
    font-family: var(--font-mono);
    font-size: 10px;
    fill: var(--text-color);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.pfd-node:hover .pfd-label, 
.pfd-node:focus .pfd-label,
.pfd-node.active .pfd-label {
    opacity: 1;
    transform: translateX(5px);
}

/* Mode Toggle */
.mode-toggle-wrapper {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 200;
}

.mode-btn {
    background: none;
    border: 1px solid var(--text-color);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Section Specifics */
.section-block {
    padding: var(--section-pad) 0;
    min-height: 80vh;
}

.meta-data {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--meta-color);
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
}

/* Skills Matrix */
.skills-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    border-top: 1px solid var(--line-color);
    padding-top: 1.5rem;
}

.skill-group h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--meta-color);
}

.skill-group ul { list-style: none; }
.skill-group li { 
    margin-bottom: 0.5rem; 
    font-size: 0.95rem;
}
.annotation {
    font-family: var(--font-mono);
    font-size: 0.7em;
    color: var(--accent-color);
    vertical-align: super;
}

/* Projects Case File */
.project-case-file {
    border: 1px solid var(--line-color);
    padding: 2rem;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.5);
    transition: transform 0.2s;
}

.project-case-file:hover {
    border-color: var(--accent-color);
}

.case-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px dotted var(--line-color);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
}

.case-outcome {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-color);
}

.case-section { margin-bottom: 1.5rem; }
.case-section h4 { font-size: 0.85rem; color: var(--meta-color); text-transform: uppercase; margin-bottom: 0.25rem; }

.technical-note {
    background: var(--highlight-bg);
    padding: 1rem;
    border-left: 2px solid var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.note-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent-color);
}

/* Interactive Slider */
.interactive-tradeoff {
    border: 1px solid var(--line-color);
    padding: 1.5rem;
    background: var(--bg-color);
}

input[type=range] {
    width: 100%;
    margin: 1rem 0;
    accent-color: var(--accent-color);
}

.tradeoff-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.metric {
    text-align: center;
}

.metric .label { display: block; font-size: 0.7rem; color: var(--meta-color); text-transform: uppercase; }
.metric .value { font-family: var(--font-mono); font-weight: bold; }

.tradeoff-comment { font-size: 0.85rem; font-style: italic; color: var(--meta-color); text-align: center; margin-top: 0.5rem; }

/* Timeline */
.timeline-entry {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.timeline-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--meta-color);
    text-align: right;
}

.timeline-date { display: block; margin-bottom: 0.25rem; }

/* Notes */
.note-item {
    border-bottom: 1px solid var(--line-color);
    padding: 1rem 0;
    cursor: pointer;
}

.note-item summary {
    list-style: none;
    font-weight: 500;
}
.note-item summary::-webkit-details-marker { display: none; }

.note-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--meta-color);
    margin-right: 1rem;
    display: inline-block;
    width: 60px;
}

.note-content {
    margin-top: 1rem;
    padding-left: 80px;
    font-size: 0.95rem;
    color: var(--meta-color);
}

/* Contact & Buttons */
.contact-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.text-link {
    background: none;
    border: none;
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    padding: 0;
}

.text-link:hover { color: var(--accent-color); }

.feedback-msg {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: #fff;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.feedback-msg.show { opacity: 1; }

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--text-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show { opacity: 1; }

/* Mobile */
@media (max-width: 768px) {
    .content-wrapper { padding: 0 1.5rem; border-left: none; }
    .pfd-nav { display: none; } /* Hide PFD on mobile */
    .reactor-level-container { display: none; }
    .grid-layout { grid-template-columns: 1fr; }
    .timeline-entry { grid-template-columns: 1fr; }
    .timeline-meta { text-align: left; margin-bottom: 0.5rem; }
    .mode-toggle-wrapper { position: absolute; }
    .note-content { padding-left: 0; }
}

/* Print */
@media print {
    body { background: white; color: black; font-size: 11pt; }
    .pfd-nav, .reactor-level-container, .mode-toggle-wrapper, #easterEggHint { display: none; }
    .content-wrapper { padding: 0; border: none; max-width: 100%; }
    .project-case-file { break-inside: avoid; border: 1px solid #ccc; }
    .interactive-tradeoff { border: 1px solid #ddd; }
    input[type=range] { display: none; } /* Hide interactive slider in print */
    .tradeoff-comment { display: block; text-align: left; }
    a { text-decoration: none; color: black; }
    a[href]:after { content: " (" attr(href) ")"; font-size: 0.8em; }
}