:root {
    --bg: #06070b;
    --panel: rgba(12, 15, 23, 0.78);
    --panel-strong: rgba(12, 15, 23, 0.95);
    --panel-soft: rgba(10, 14, 23, 0.72);
    --text: #f4f7ff;
    --muted: rgba(232, 238, 255, 0.78);
    --soft: rgba(232, 238, 255, 0.58);
    --line: rgba(255, 255, 255, 0.16);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 28px rgba(255, 255, 255, 0.08);
    --buffer: 16px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(145, 173, 255, 0.08), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(180deg, #05060a, #090b10 42%, #05060a 100%);
}

.page-shell {
    width: min(1480px, calc(100vw - 40px));
    margin: 20px auto;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.2fr) 420px;
    grid-template-rows: auto minmax(640px, 1fr) auto;
    grid-template-areas:
    "hero resume"
    "graph resume"
    "footer footer";
}

.card {
    background: linear-gradient(180deg, rgba(15, 20, 31, 0.78), rgba(7, 10, 18, 0.72));
    border: 1px solid var(--border);
    border-radius: 0;
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
}

.hero-card {
    grid-area: hero;
    padding: 32px 34px;
}

.resume-panel {
    grid-area: resume;
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.graph-stage {
    grid-area: graph;
    position: relative;
    min-height: 640px;
    overflow: hidden;
    padding: 18px;
}

.footer {
    grid-area: footer;
    padding: 18px 24px;
}

.eyebrow {
    color: var(--soft);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

h1 {
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 0.96;
    margin: 0 0 10px;
}

.role {
    color: var(--muted);
    font-size: clamp(1rem, 1.55vw, 1.45rem);
    margin-bottom: 22px;
}

.offering {
    max-width: 64ch;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0 0 16px;
}

.bullets {
    margin: 0;
    padding-left: 1.3rem;
    color: var(--muted);
    line-height: 1.9;
}

.panel-header h2 {
    margin: 0 0 6px;
    font-size: 1.65rem;
}

.panel-subtitle {
    color: var(--muted);
    margin-bottom: 4px;
}

.resume-compress-note {
    color: var(--soft);
    font-size: 0.9rem;
    margin: 0;
}

.resume-panel section + section {
    margin-top: 18px;
}

.resume-panel h3,
.resume-grid h3,
.prose-list h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--soft);
    margin: 0 0 12px;
}

.resume-panel p, .panel-list, .resume-grid p, .resume-grid ul, .prose-list p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.resume-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 12px;
}

.panel-list, .resume-grid ul {
    padding-left: 1.1rem;
}

.button-stack {
    display: grid;
    gap: 10px;
}

.panel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 0;
    border: 1px solid var(--border-strong);
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
    cursor: pointer;
}

.panel-button.primary {
    background: rgba(255, 255, 255, 0.1);
}

.panel-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.graph-label {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 3;
    padding: 10px 14px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 23, 0.72);
    color: var(--soft);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.graph-canvas, .graph-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.graph-lines {
    overflow: visible;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
}

.node {
    position: absolute;
    transform: translate(-50%, -50%);
    transition: left 380ms ease, top 380ms ease, opacity 240ms ease, transform 240ms ease, box-shadow 180ms ease, border-color 180ms ease;
    user-select: none;
}

.node-button {
    min-width: 150px;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 14, 23, 0.74);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--glow);
    border-radius: 999px;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
}

.node-button:hover,
.node-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 34px rgba(255, 255, 255, 0.16);
    outline: none;
}

.node-button.active {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 40px rgba(255, 255, 255, 0.2);
}

.footer {
    display: grid;
    gap: 10px;
}

.ethics-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: var(--soft);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 8, 0.7);
    backdrop-filter: blur(8px);
    z-index: 40;
}

.hidden {
    display: none !important;
}

.modal-window {
    position: fixed;
    left: var(--buffer);
    right: var(--buffer);
    top: var(--buffer);

    margin: auto;
    z-index: 50;

    max-width: 860px;
    height: auto;
    max-height: calc(100vh - (var(--buffer) * 2));

    background: linear-gradient(
            180deg,
            rgba(13, 17, 27, 0.96),
            rgba(8, 11, 18, 0.94)
    );

    display: flex;
    flex-direction: column;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 26px 18px;
    background: rgba(13, 17, 27, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h2 {
    margin: 4px 0 0;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.modal-kicker {
    color: var(--soft);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modal-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 0;
    cursor: pointer;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.09);
}

.modal-scroll {
    overflow-y: auto;
    padding: 26px 32px 28px;

    max-height: calc(100vh - 160px);
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.service-modal-intro {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.75;
    font-size: 1rem;
    max-width: 70ch;
}

.prose-list {
    display: grid;
    gap: 26px;
}

.prose-list section,
.prose-list article {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.prose-list h3,
.prose-list h4 {
    margin: 0 0 8px;
    font-size: 1.06rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
}

.prose-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
}

.full-span {
    grid-column: 1 / -1;
}

.resume-role {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.core-tech {
    margin-top: 6px;
    margin-bottom: 16px;
}

.core-tech li {
    margin-bottom: 4px;
}

.profile-photo {
    width: 90px;
    height: 90px;

    object-fit: cover;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,0.15);

    flex-shrink: 0;
}

@media (max-width: 1120px) {
    .page-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(580px, 1fr) auto auto;
        grid-template-areas:
      "hero"
      "graph"
      "resume"
      "footer";
    }

    .resume-panel {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 760px) {
    :root {
        --buffer: 10px;
    }

    .page-shell {
        width: min(100vw - 20px, 900px);
        margin: 10px auto;
        gap: 12px;
    }

    .hero-card, .resume-panel, .footer {
        padding: 20px;
    }

    .graph-stage {
        min-height: 560px;
    }

    .node-button {
        min-width: 170px;
        min-height: 50px;
        font-size: 0.95rem;
    }

    .modal-header,
    .modal-scroll {
        padding-left: 18px;
        padding-right: 18px;
    }

    .resume-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.section-kicker {
    color: var(--soft);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.project-panel {
    position: absolute;
    right: 24px;
    top: 24px;
    z-index: 4;
    width: min(360px, calc(100% - 48px));
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 23, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: var(--glow);
}

.project-panel h2 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.project-panel p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

.project-panel ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.75;
}

.graph-lines {
    pointer-events: none;
}

@media (max-width: 760px) {
    .project-panel {
        top: auto;
        right: 14px;
        left: 14px;
        bottom: 16px;
        width: auto;
        padding: 16px 18px;
    }
}

.text-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.text-link:hover {
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-actions .panel-button {
    min-width: 180px;
}
