:root {
    --bg-dark: #0a0e27;
    --bg-darker: #060815;
    --node-idle: #1e3a8a;
    --node-active: #3b82f6;
    --node-complete: #10b981;
    --node-running: #f59e0b;
    --edge-color: #4b5563;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent: #06b6d4;
    --panel-bg: #1e293b;
    --node-hover: #60a5fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Terminal Header */
.terminal-header {
    background: var(--panel-bg);
    border-bottom: 0.5px solid #334155;
    padding: 0;
    margin-bottom: 0.1rem;
}

.terminal-bar {
    background: #1a1f36;
    padding: 0.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-button.red {
    background: #ff5f56;
}

.terminal-button.yellow {
    background: #ffbd2e;
}

.terminal-button.green {
    background: #27c93f;
}

.terminal-title {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.terminal-content {
    padding: 1rem 1rem;
}

.typing-text {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--node-complete);
    margin-right: 0.5rem;
}

.output-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: opacity 0.3s ease;
}

/* Controls Panel - Hidden */
.controls-panel {
    display: none;
}

/* DAG Container */
.dag-container {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 520px;
    margin: 1rem auto 1rem;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(255, 255, 255, 0.1) 30px),
        repeating-linear-gradient(90deg, transparent, transparent 29px, rgba(255, 255, 255, 0.1) 30px),
        radial-gradient(circle at center, #1e293b22 0%, transparent 70%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
}

#dag-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.dag-nodes {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}

/* DAG Nodes */
.dag-node {
    position: absolute;
    width: 150px;
    height: 90px;
    margin-left: 0rem;
    margin-right: 0rem;
    background: linear-gradient(135deg, var(--node-idle), #1e3a8add);
    border: 2px solid var(--node-active);
    border-radius: 10px;
    cursor: grab;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    /* Center the texts inside node vertically */
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    /* Ensure touch events work on mobile */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dag-node:not(.dragging) {
    cursor: grab;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.dag-node.dragging {
    cursor: grabbing;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.6);
    transition: box-shadow 0.2s ease;
}

.dag-node:hover:not(.dragging) {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, var(--node-hover), #60a5fadd);
}

.dag-node.active {
    background: linear-gradient(135deg, var(--node-running), #f59e0bdd);
    border-color: var(--node-running);
    animation: pulse 2s infinite;
}

.dag-node.completed {
    background: linear-gradient(135deg, var(--node-complete), #10b981dd);
    border-color: var(--node-complete);
    animation: completePulse 1.5s ease;
}

/* .dag-node.start-node {
    background: linear-gradient(135deg, #065f46, #10b981) !important;
    border-color: #10b981 !important;
} */

.dag-node.end-node {
    background: linear-gradient(135deg, #7c2d12, #f59e0b) !important;
    border-color: #f59e0b !important;
}

/* Node Animations */
@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow: 0 4px 40px rgba(245, 158, 11, 0.6);
    }
}

@keyframes completePulse {
    0% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(16, 185, 129, 0.5);
    }

    100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }
}

/* Node Content */
.node-content {
    text-align: center;
    padding: 0.5rem;
    pointer-events: none;
}

.node-content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.node-content p {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.node-stage {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
}

/* SVG Edges */
.dag-edge {
    stroke: var(--edge-color);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 5, 5;
    animation: dashMove 20s linear infinite;
    pointer-events: none;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -100;
    }
}

.dag-edge.highlighted {
    stroke: var(--node-active);
    stroke-width: 3;
    stroke-dasharray: none;
}

/* Animated Data Flow Dots */
.data-flow-dot {
    opacity: 0.95;
    transition: r 0.05s ease;
}

/* Entrance Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawLine {
    from {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* Content Panels */
.content-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: var(--panel-bg);
    border: 1px solid #334155;
    border-radius: 12px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.content-panel.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.panel-header {
    background: linear-gradient(90deg, var(--node-active), var(--accent));
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.close-btn {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.2s;
    color: var(--text-primary);
    user-select: none;
    /* Ensure touch events work on mobile */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.panel-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(85vh - 60px);
}

.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--node-idle);
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--node-active);
}

.panel-content h1 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.panel-content h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.panel-content h3 {
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.panel-content h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.panel-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Interaction Hint */
.interaction-hint {
    background: var(--bg-darker);
    border-left: 3px solid var(--accent);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.interaction-hint p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.interaction-hint p:first-child {
    margin-top: 0;
}

.interaction-hint p:last-child {
    margin-bottom: 0;
}

.interaction-hint strong {
    color: var(--accent);
}

/* Code Blocks */
.code-block {
    background: var(--bg-darker);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block::-webkit-scrollbar {
    height: 6px;
}

.code-block::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.code-block::-webkit-scrollbar-thumb {
    background: var(--node-idle);
    border-radius: 3px;
}

.code-block pre {
    color: var(--accent);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric {
    background: var(--bg-darker);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #334155;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric:hover {
    transform: translateY(-2px);
    border-color: var(--node-active);
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    display: block;
    font-size: 1.125rem;
    color: var(--accent);
    font-weight: 600;
}

/* Experience & Project Items */
.experience-item,
.project-item {
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #334155;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.experience-item:hover,
.project-item:hover {
    border-color: var(--node-active);
}

.experience-header,
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.experience-title h3,
.project-title h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.experience-title h4,
.project-title h4 {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
}

.experience-duration,
.project-tech {
    background: var(--node-idle);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.project-tech {
    background: transparent;
    border: 1px solid var(--node-idle);
    padding: 0.5rem 1rem;
}

/* Education Items */
.education-item {
    background: var(--bg-darker);
    padding: clamp(0.8rem, 2vh, 1.5rem);
    border-radius: 8px;
    border: 1px solid #334155;
    margin-bottom: clamp(0.8rem, 2vh, 1.5rem);
    transition: border-color 0.3s ease;
}

.education-item:hover {
    border-color: var(--node-active);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: clamp(0.6rem, 1.5vh, 1rem);
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1vh, 1rem);
}

.education-title h3 {
    color: var(--accent);
    margin-bottom: clamp(0.3rem, 0.8vh, 0.5rem);
    font-size: clamp(0.85rem, 1.8vh, 1.1rem);
}

.education-title h4 {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: clamp(0.7rem, 1.4vh, 0.9rem);
}

.education-duration {
    background: var(--node-idle);
    padding: clamp(0.25rem, 0.6vh, 0.375rem) clamp(0.5rem, 1vw, 0.75rem);
    border-radius: 20px;
    font-size: clamp(0.65rem, 1.3vh, 0.8rem);
    color: var(--text-primary);
    white-space: nowrap;
}

.education-gpa {
    color: var(--text-secondary);
    font-size: clamp(0.75rem, 1.5vh, 0.9rem);
    margin-bottom: clamp(0.6rem, 1.5vh, 1rem);
}

.education-gpa strong {
    color: var(--accent);
}

.achievements {
    margin-top: clamp(0.6rem, 1.5vh, 1rem);
}

.achievements ul {
    padding-left: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(0.3rem, 0.8vh, 0.5rem);
}

.achievements li {
    margin-bottom: clamp(0.3rem, 0.8vh, 0.5rem);
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: clamp(0.7rem, 1.4vh, 0.85rem);
}

.coursework {
    margin-top: clamp(0.8rem, 2vh, 1.2rem);
    padding-top: clamp(0.8rem, 2vh, 1.2rem);
    border-top: 1px solid #334155;
}

.coursework h5 {
    color: var(--accent);
    font-size: clamp(0.75rem, 1.5vh, 0.9rem);
    margin-bottom: clamp(0.5rem, 1.2vh, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coursework-tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.3rem, 0.8vh, 0.5rem);
}

.course-tag {
    background: linear-gradient(135deg, var(--node-idle), #1e3a8add);
    padding: clamp(0.25rem, 0.6vh, 0.375rem) clamp(0.5rem, 1vw, 0.75rem);
    border-radius: 20px;
    font-size: clamp(0.65rem, 1.3vh, 0.8rem);
    border: 1px solid var(--node-active);
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.responsibilities,
.project-description {
    margin-top: 1rem;
}

.responsibilities ul,
.features-list {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.responsibilities li,
.features-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-metrics {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.metric-badge {
    background: linear-gradient(135deg, var(--node-idle), #1e3a8add);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid var(--node-active);
    white-space: nowrap;
}

/* Skills */
.skills-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.skill-category {
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #334155;
    transition: border-color 0.3s ease;
}

.skill-category:hover {
    border-color: var(--node-active);
}

.skill-category h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-item {
    background: linear-gradient(135deg, var(--node-idle), #1e3a8add);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid var(--node-active);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.skill-level {
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    color: var(--node-complete);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.contact-item {
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #334155;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.contact-item:hover {
    background: var(--node-idle);
    transform: translateY(-3px);
    border-color: var(--node-active);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.contact-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3000;
    display: none;
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #334155;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-indicator.active {
    display: block !important;
    opacity: 1;
    animation: fadeInLoader 0.3s ease forwards;
}

@keyframes fadeInLoader {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.loading-indicator p {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.875rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--edge-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel-bg);
    border-top: 1px solid #334155;
    padding: 0.75rem 2rem;
    display: flex;
    gap: 2rem;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-value {
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.status-value.running {
    color: var(--node-complete);
}

.status-value.active-flow {
    color: var(--node-complete);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Feature List */
.feature-list {
    margin-top: 1.5rem;
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #334155;
}

.feature-list h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.feature-list ul {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-list li:before {
    content: 'â†’';
    position: absolute;
    left: 0;
    color: var(--node-active);
    font-weight: bold;
}

/* Proximity Warning (Optional) */
.dag-node.proximity-warning {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5) !important;
}

/* Mobile-specific optimizations for 6.1" screens and below */
@media (max-width: 480px) {

    /* Hide terminal header on mobile */
    .terminal-header {
        display: none;
    }

    /* Reduce DAG container height for mobile */
    .dag-container {
        height: calc(100vh - 100px);
        margin: 0 !important;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 30px;
    }

    /* Smaller DAG nodes for mobile */
    .dag-node {
        width: 60px;
        height: 35px;
    }

    .node-content h3 {
        font-size: 0.5rem;
        margin-bottom: 0.02rem;
    }

    .node-content p {
        display: none;
    }

    .node-stage {
        top: -10px;
        font-size: 0.4rem;
        padding: 1px 2px;
    }

    /* Reduce progress bar size */
    .progress-container {
        width: 100%;
        padding: 0.1rem 0.2rem 0.05rem 0.2rem;
        margin: 0 !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
    }

    .progress-header {
        margin-bottom: 0.4rem;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-direction: row !important;
    }

    .progress-label {
        font-size: 0.6rem;
    }

    .progress-percentage {
        font-size: 0.6rem;
    }

    .progress-bar-wrapper {
        height: 4px !important;
    }

    .progress-remaining {
        display: none !important;
    }

    /* Compact status bar */
    .status-bar {
        padding: 0.05rem 0.3rem 0.1rem 0.3rem !important;
        gap: 0.3rem !important;
        flex-wrap: wrap;
        align-items: center !important;
        justify-content: center !important;
    }

    .status-item {
        font-size: 0.7rem;
    }

    /* Smaller content panels */
    .content-panel {
        width: 95%;
        max-height: 85vh;
    }

    .panel-content {
        padding: 1rem;
    }

    .panel-content h1 {
        font-size: 1.2rem;
    }

    .panel-content h2 {
        font-size: 1rem;
    }

    .panel-content h3 {
        font-size: 0.9rem;
    }

    /* Compact metrics and grids */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 1rem 0;
    }

    .metric {
        padding: 0.8rem;
    }

    .metric-label {
        font-size: 0.65rem;
    }

    .metric-value {
        font-size: 0.9rem;
    }

    /* Compact experience and project items */
    .experience-item,
    .project-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .experience-header,
    .project-header {
        flex-direction: column;
        align-items: start;
        gap: 0.5rem;
    }

    .experience-title h3,
    .project-title h3 {
        font-size: 0.9rem;
    }

    .experience-title h4,
    .project-title h4 {
        font-size: 0.8rem;
    }

    .experience-duration,
    .project-tech {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    /* Compact education items */
    .education-item {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .education-title h3 {
        font-size: 0.85rem;
    }

    .education-title h4 {
        font-size: 0.7rem;
    }

    .education-duration {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .education-gpa {
        font-size: 0.7rem;
    }

    .achievements li {
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }

    .coursework h5 {
        font-size: 0.7rem;
    }

    .course-tag {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    /* Compact skills */
    .skill-category {
        padding: 1rem;
    }

    .skill-category h4 {
        font-size: 0.85rem;
    }

    .skill-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .skill-level {
        font-size: 0.6rem;
    }

    /* Compact contact grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-item {
        padding: 1rem;
    }

    .contact-icon {
        font-size: 1.5rem;
    }

    /* Additional mobile optimizations for 6.1" screens */
    body {
        font-size: 14px;
        overflow: hidden !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        position: fixed !important;
        width: 100% !important;
        background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%) !important;
        color: var(--text-primary) !important;
    }

    /* Remove bottom space from main page */
    html {
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%) !important;
    }

    /* Allow scrolling only within DAG container if needed */
    .dag-container {
        overflow: auto;
    }

    /* Reduce overall spacing */
    .dag-container {
        margin-top: 0.2rem;
        margin-bottom: 0.2rem;
    }

    /* Compact code blocks */
    .code-block {
        padding: 0.8rem;
        margin: 0.8rem 0;
    }

    .code-block pre {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* Compact interaction hints */
    .interaction-hint {
        padding: 0.8rem;
        margin: 1rem 0;
    }

    .interaction-hint p {
        font-size: 0.7rem;
        margin: 0.3rem 0;
    }

    /* Compact feature lists */
    .feature-list {
        padding: 1rem;
        margin: 1rem 0;
    }

    .feature-list h3 {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .feature-list li {
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }

    /* Compact responsibilities */
    .responsibilities ul,
    .features-list {
        padding-left: 1rem;
        margin-top: 0.4rem;
    }

    .responsibilities li,
    .features-list li {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }

    /* Compact project metrics */
    .project-metrics {
        gap: 0.5rem;
        margin-top: 0.8rem;
    }

    .metric-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    /* Compact skills grid */
    .skills-grid {
        gap: 1rem;
        margin-top: 1rem;
    }

    .skill-items {
        gap: 0.4rem;
    }

    /* Compact panel headers */
    .panel-header {
        padding: 0.8rem 1rem;
    }

    .stage-label {
        font-size: 0.8rem;
    }

    .close-btn {
        font-size: 1.2rem;
    }
}

/* Extra small screens (very small phones) */
@media (max-width: 360px) {
    .dag-container {
        height: 350px;
    }

    .dag-node {
        width: 70px;
        height: 45px;
    }

    .node-content h3 {
        font-size: 0.55rem;
    }

    .node-stage {
        font-size: 0.45rem;
        top: -12px;
    }

    .progress-container {
        padding: 0.3rem 0.5rem 0.1rem 0.5rem;
    }

    .progress-label,
    .progress-percentage {
        font-size: 0.55rem;
    }

    .progress-bar-wrapper {
        height: 3px !important;
    }

    .status-bar {
        padding: 0.02rem 0.25rem 0.05rem 0.25rem !important;
        gap: 0.25rem !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .status-item {
        font-size: 0.65rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dag-container {
        height: 700px;
        margin-bottom: 70px;
    }
}

@media (max-width: 768px) {
    .dag-container {
        height: 500px;
        width: 98%;
        margin: 0 auto !important;
        margin-bottom: 50px;
    }

    .dag-node {
        width: 100px;
        height: 60px;
    }

    .node-content h3 {
        font-size: 0.7rem;
    }

    .node-content p {
        font-size: 0.55rem;
    }

    .node-stage {
        font-size: 0.6rem;
        padding: 1px 5px;
    }

    .status-bar {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.8rem;
    }

    .status-item {
        font-size: 0.75rem;
    }

    .content-panel {
        width: 95%;
        max-height: 90vh;
    }

    .panel-content {
        padding: 1.2rem;
    }

    .panel-content h1 {
        font-size: 1.4rem;
    }

    .panel-content h2 {
        font-size: 1.1rem;
    }
}

/* Remove duplicate 480px styles - they're now handled above */

/* Print Styles */
@media print {

    .terminal-header,
    .status-bar,
    .close-btn {
        display: none;
    }

    .dag-container {
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .content-panel {
        position: relative;
        transform: none;
        page-break-inside: avoid;
    }
}

/* Accessibility */
.dag-node:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.control-btn:focus,
.contact-item:focus,
.close-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dag-node {
        border-width: 3px;
    }

    .dag-edge {
        stroke-width: 3px;
    }

    .data-flow-dot {
        r: 6;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .data-flow-dot {
        display: none;
    }
}

/* Dark Mode Adjustments (if system preference changes) */
@media (prefers-color-scheme: light) {
    /* Keep dark theme regardless - it's a Spark DAG theme */
}


/* Progress Bar Section */
.progress-container {
    width: 90%;
    max-width: 1400px;
    margin: 0.8rem auto;
    padding: 0.75rem 1.5rem 0.25rem 1.5rem;
    background: var(--panel-bg);
    border: 1px solid #334155;
    border-radius: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-percentage {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 700;
}

.progress-bar-wrapper {
    width: 100%;
    height: 15px;
    background: var(--bg-darker);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #334155;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981, #34d399);
    width: 0%;
    transition: width 0.6s ease;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-remaining {
    margin: 0.35rem auto 0.35rem auto;
    text-align: center;
}

.progress-remaining span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-darker);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #334155;
    display: inline-block;
}

/* Fix text color on visited (green) nodes */
.dag-node.visited {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border-color: #10b981 !important;
}

.dag-node.visited .node-content h3 {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dag-node.visited .node-content p {
    color: #d1fae5 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dag-node.visited .node-stage {
    background: #059669;
    color: #d1fae5;
    border: 1px solid #10b981;
}

/* Update completed animation for visited nodes */
.dag-node.completed {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border-color: #10b981 !important;
    animation: completePulse 1.5s ease;
}

.dag-node.completed .node-content h3 {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.dag-node.completed .node-content p {
    color: #d1fae5 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for progress bar */
@media (max-width: 768px) {
    .progress-container {
        width: 98%;
        padding: 0.75rem 1rem;
        margin: auto !important;
        margin-top: 4px !important;
    }

    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .progress-bar-wrapper {
        height: 20px;
    }

    .progress-remaining span {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .progress-remaining span {
        font-size: 0.65rem;
        word-break: break-word;
    }
}