/* ================================================================
   FALLOUT PIP-BOY CV THEME
   Terminal/Pip-Boy interface inspired by the Fallout game series
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* ================================================================
   BOOT SEQUENCE IN HEADER
   ================================================================ */
.boot-sequence {
    text-align: center;
    transition: opacity 0.5s ease-out;
    width: 100%;
}

.real-content {
    display: none;
}

#nameText, #titleText {
    visibility: hidden;
}

.boot-line {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 2px 0;
    opacity: 0;
    transition: opacity 0.1s ease-out;
}

.boot-line:nth-child(1),
.boot-line:nth-child(2) {
    font-size: 10px;
    color: var(--green);
}

.boot-line:nth-child(3) {
    font-size: 9px;
    color: var(--green-dim);
    margin: 6px 0;
}

.boot-line:nth-child(4),
.boot-line:nth-child(11) {
    font-size: 10px;
    color: var(--green-dark);
    letter-spacing: 3px;
}

.boot-line:nth-child(5),
.boot-line:nth-child(6),
.boot-line:nth-child(7),
.boot-line:nth-child(8),
.boot-line:nth-child(9) {
    font-size: 9px;
    color: var(--green-mid);
    text-align: left;
    padding-left: 20%;
}

.boot-line:nth-child(10) {
    font-size: 11px;
    color: var(--green-bright);
    text-shadow: var(--glow-md);
    margin: 4px 0;
}

.boot-line:nth-child(12) {
    font-size: 12px;
    color: var(--green);
    text-align: left;
    padding-left: 20%;
    animation: boot-cursor-blink 0.5s step-end infinite;
}

@keyframes boot-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.terminal-line {
    display: block;
    text-align: center;
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 12px;
    background: var(--green);
    margin-left: 4px;
    animation: blink 0.8s step-end infinite;
    vertical-align: baseline;
    opacity: 0;
}

.typing-cursor.active {
    opacity: 1;
}

@media print {
    .boot-sequence {
        display: none !important;
    }
    .real-content {
        display: block !important;
    }
    #nameText, #titleText {
        visibility: visible !important;
    }
    .name, .title-line {
        visibility: visible !important;
    }
    .typing-cursor {
        display: none !important;
    }
    .boot-line {
        animation: none !important;
    }
    .typing-video {
        display: none !important;
    }
}

/* --- Design Tokens --- */
:root {
    --green:        #00ff41;
    --green-bright: #33ff66;
    --green-mid:    #00cc33;
    --green-dim:    #00aa22;
    --green-dark:   #006611;
    --green-darker: #003d0a;
    --green-subtle: #002200;
    --bg:           #010001;
    --bg-section:   #0a150a;
    --bg-header:    #010001;
    --glow-sm:      0 0 4px rgba(0,255,65,0.25);
    --glow-md:      0 0 8px rgba(0,255,65,0.3);
    --glow-lg:      0 0 14px rgba(0,255,65,0.2);
    --font:         'Share Tech Mono', 'Courier New', 'Lucida Console', monospace;
    --page-w:       8.5in;
    --page-h:       11in;
    --margin:       0.45in;
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Base --- */
body {
    font-family: var(--font);
    background: #010001;
    color: var(--green-mid);
    font-size: 11.5px;
    line-height: 1.55;
    -webkit-font-smoothing: auto;
}

a {
    color: var(--green-mid);
    text-decoration: none;
}

/* ------------------------------------------------
   CRT EFFECTS  (screen only, removed for print)
   ------------------------------------------------ */

/* Scanlines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px, transparent 2px,
        rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* Vignette */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.65);
    pointer-events: none;
    z-index: 9998;
}

/* Subtle flicker */
@keyframes crt-flicker {
    0%   { opacity: .98; }
    5%   { opacity: .96; }
    10%  { opacity: .99; }
    15%  { opacity: .97; }
    100% { opacity: .98; }
}

/* ------------------------------------------------
   PAGE / CONTAINER
   ------------------------------------------------ */
.container {
    max-width: var(--page-w);
    margin: 20px auto;
}

.page {
    width: var(--page-w);
    height: var(--page-h);
    padding: var(--margin);
    position: relative;
    overflow: hidden;
    background: var(--bg);
    border: 2px solid var(--green-dark);
    display: flex;
    flex-direction: column;
    animation: crt-flicker 4s infinite;
    transform: scale(1.25);
    transform-origin: top center;
    margin-bottom: calc(var(--page-h) * 0.25 + 20px);
}

.page + .page {
    margin-top: calc(var(--page-h) * 0.25 + 20px);
}

/* ------------------------------------------------
   HEADER  (name + title)
   ------------------------------------------------ */
.header {
    border: 1px solid var(--green-dark);
    padding: 16px 18px 14px;
    margin-bottom: 18px;
    text-align: center;
    background:
        radial-gradient(ellipse at center, rgba(0,255,65,0.08) 0%, transparent 60%, rgba(0,20,0,0.9) 100%),
        linear-gradient(180deg, rgba(0,255,65,0.06) 0%, transparent 50%, rgba(0,255,65,0.06) 100%),
        repeating-linear-gradient(0deg, rgba(0,255,65,0.15) 0px, rgba(0,255,65,0.15) 1px, transparent 1px, transparent 3px),
        var(--bg-header);
    position: relative;
    box-shadow:
        inset 0 0 80px rgba(0,0,0,0.9),
        0 0 20px rgba(0,255,65,0.1);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}



.name {
    font-size: 40px;
    letter-spacing: 10px;
    text-transform: uppercase;
    color: var(--green);
    text-shadow:
        0 0 5px rgba(0,255,65,0.8),
        0 0 10px rgba(0,255,65,0.5),
        0 0 20px rgba(0,255,65,0.3),
        0 0 40px rgba(0,255,65,0.2);
    line-height: 1;
}

.title-line {
    font-size: 12px;
    color: var(--green-dim);
    margin-top: 6px;
    letter-spacing: 2px;
    white-space: nowrap;
}

.linkedin-line {
    font-size: 10px;
    color: var(--green-dim);
    margin-top: 8px;
    letter-spacing: 1px;
    transition: opacity 0.5s ease;
}

/* ------------------------------------------------
   CONTACT BAR
   ------------------------------------------------ */
.contact-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--green-dark);
    font-size: 10.5px;
    color: var(--green-dim);
}

.contact-bar span:not(:last-child)::after {
    content: ' //';
    color: var(--green-dark);
    margin: 0 6px;
}

/* ------------------------------------------------
   TWO-COLUMN LAYOUT  (page 1)
   ------------------------------------------------ */
.columns {
    display: flex;
    gap: 14px;
    flex: 1;
}

.sidebar {
    width: 187px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar .section:last-child {
    margin-bottom: 0;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main .section:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------
   SECTION  (fieldset-style bordered container)
   ------------------------------------------------ */
.section {
    border: 1px solid var(--green-dark);
    padding: 18px 14px 14px;
    margin-bottom: 14px;
    position: relative;
}

.section-header {
    position: absolute;
    top: -9px;
    left: 10px;
    background: var(--bg);
    padding: 0 6px;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--green);
}

/* Right-side section label */
.section-header-right {
    position: absolute;
    top: -9px;
    right: 10px;
    background: var(--bg);
    padding: 0 6px;
    font-size: 9px;
    color: var(--green-dark);
    letter-spacing: 1.5px;
}

/* ------------------------------------------------
   SKILL RATINGS  (Fallout /10 style)
   ------------------------------------------------ */
.skill-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 9px;
    font-size: 11px;
}

.skill-name {
    color: var(--green-mid);
    white-space: nowrap;
}

.skill-val {
    color: var(--green);
    font-size: 11px;
    text-shadow: var(--glow-sm);
    white-space: nowrap;
    margin-left: 8px;
}

/* Tech stack inside skills section */
.tech-section {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--green-dark);
}

.tech-label {
    font-size: 10px;
    color: var(--green-dark);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

/* ------------------------------------------------
   INFO ITEMS  (languages, certs)
   ------------------------------------------------ */
.info-item {
    font-size: 10.5px;
    color: var(--green-mid);
    margin-bottom: 5px;
    padding-left: 12px;
    position: relative;
    line-height: 1.5;
}

.info-item::before {
    content: '>';
    position: absolute;
    left: 1px;
    color: var(--green-dark);
}

.info-detail {
    color: var(--green-dark);
    font-size: 9.5px;
}

/* ------------------------------------------------
   TYPING VIDEO
   ------------------------------------------------ */
.typing-video {
    margin-top: 16px;
    overflow: hidden;
}

.typing-video video {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------------------------
   SUMMARY
   ------------------------------------------------ */
.summary-text {
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--green-mid);
}

/* ------------------------------------------------
   JOB ENTRY
   ------------------------------------------------ */
.job {
    margin-bottom: 16px;
}

.job:last-child {
    margin-bottom: 0;
}

.company-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--green-dark);
    padding-bottom: 3px;
    margin-bottom: 3px;
}

.company-name {
    font-size: 14px;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: var(--glow-sm);
}

.company-duration {
    font-size: 9.5px;
    color: var(--green-mid);
}

.job-title {
    font-size: 12.5px;
    color: var(--green-bright);
    margin: 3px 0;
}

.job-meta {
    font-size: 9.5px;
    color: var(--green-mid);
    margin-bottom: 6px;
}

.job-bullets {
    list-style: none;
    padding: 0;
}

.job-bullets li {
    font-size: 12px;
    color: var(--green-mid);
    padding-left: 14px;
    position: relative;
    margin-bottom: 5px;
    line-height: 1.45;
}

.job-bullets li::before {
    content: '>';
    position: absolute;
    left: 2px;
    color: var(--green-dark);
    font-size: 10px;
}

/* ------------------------------------------------
   EDUCATION
   ------------------------------------------------ */
.edu-item {
    margin-bottom: 10px;
}

.edu-name {
    font-size: 12px;
    color: var(--green);
}

.edu-detail {
    font-size: 11px;
    color: var(--green-mid);
}

/* ------------------------------------------------
   TECH STACK  (keyword cloud)
   ------------------------------------------------ */
.tech-list {
    font-size: 9.5px;
    color: var(--green-dim);
    line-height: 1.8;
}

.tech-item:not(:last-child)::after {
    content: ' //';
    color: var(--green-dark);
}

/* ------------------------------------------------
   PAGE FOOTER
   ------------------------------------------------ */
.page-footer {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 7.5px;
    color: var(--green-darker);
    letter-spacing: 1.5px;
}

/* ------------------------------------------------
   PRINT STYLES
   ------------------------------------------------ */
@page {
    size: letter;
    margin: 0;
}

@media print {
    :root {
        --print-bg: #fff;
        --print-text: #222;
        --print-text-light: #333;
        --print-text-muted: #444;
        --print-text-dim: #555;
        --print-text-subtle: #777;
        --print-text-faint: #888;
        --print-text-very-faint: #999;
        --print-text-ultra-faint: #aaa;
        --print-border: #ccc;
        --print-border-light: #999;
    }

    body {
        background: var(--print-bg);
        color: var(--print-text);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
    }

    body::after,
    body::before {
        display: none;
    }

    .container {
        margin: 0;
    }

    .page {
        page-break-after: always;
        border: none;
        margin: 0;
        animation: none;
        box-shadow: none;
        background: var(--print-bg);
        transform: none;
    }

    .page:last-child {
        page-break-after: avoid;
    }

    .page + .page {
        margin-top: 0;
    }

    /* --- B/W overrides --- */
    .header {
        background: var(--print-bg);
        border-color: #333;
        box-shadow: none;
        min-height: auto;
    }
    .header::before {
        background: var(--print-bg);
        color: var(--print-text-very-faint);
        opacity: 1;
    }
    .header.boot-complete::before {
        opacity: 1;
    }
    .name {
        color: #111;
        text-shadow: none;
    }
    .title-line { color: var(--print-text-dim); }

    .contact-bar { color: var(--print-text-muted); border-bottom-color: var(--print-border); }
    .contact-bar span:not(:last-child)::after { color: var(--print-text-very-faint); }

    a { color: var(--print-text); }

    .section { border-color: var(--print-border-light); }
    .section-header { background: var(--print-bg); color: #111; }
    .section-header-right { background: var(--print-bg); color: var(--print-text-faint); }

    .skill-name { color: var(--print-text-light); }
    .skill-val { color: #111; text-shadow: none; }

    .tech-section { border-top-color: var(--print-border); }
    .tech-label { color: var(--print-text-subtle); }
    .tech-list { color: var(--print-text-muted); }
    .tech-item:not(:last-child)::after { color: var(--print-text-very-faint); }

    .summary-text { color: var(--print-text-light); }

    .company-name { color: #111; text-shadow: none; }
    .company-line { border-bottom-color: var(--print-border); }
    .company-duration { color: var(--print-text-subtle); }
    .job-title { color: var(--print-text); }
    .job-meta { color: var(--print-text-subtle); }
    .job-bullets li { color: var(--print-text-light); }
    .job-bullets li::before { color: var(--print-text-very-faint); }

    .info-item { color: var(--print-text-light); }
    .info-item::before { color: var(--print-text-very-faint); }
    .info-detail { color: var(--print-text-subtle); }

    .edu-name { color: #111; }
    .edu-detail { color: var(--print-text-light); }

    .page-footer { color: var(--print-text-ultra-faint); }
}

@media screen {
    .page {
        box-shadow: 0 0 40px rgba(0,255,65,0.07), inset 0 0 60px rgba(0,255,65,0.02);
    }
}
