/* =====================================================
   TOKENS — CIA DOSSIER / CYBER TERMINAL
====================================================== */
:root {
    --display: "Share Tech Mono", monospace;
    --serif:   "Space Mono", monospace;
    --sans:    "Space Mono", monospace;
    --rule: 1px;
    --radius: 0px; 
    --shell: min(1180px, 100%);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --label-track: 0.15em;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg:        #050505;
    --bg-deep:   #000000;
    --panel:     #0d1110;
    --panel-2:   #121816;
    --text:      #c2d1c9;
    --muted:     #7a9485;
    --faint:     #3a4f43;
    --line:      #1c2b23;
    --line-soft: #121c17;
    --red:       #df0000;
    --red-ink:   #ff2a2a;
    --red-soft:  rgba(223, 0, 0, 0.15);
    --rule-lines: rgba(0, 255, 85, 0.05);
    --vignette:   rgba(0, 0, 0, 0.85);
    --grain:      rgba(255, 255, 255, 0.02);
    --img: grayscale(1) contrast(1.4) brightness(0.7) sepia(0.3) hue-rotate(90deg);
    --img-hover: grayscale(0) contrast(1.2) brightness(0.9);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg:        #f0f0ea;
    --bg-deep:   #e2e2d9;
    --panel:     #ffffff;
    --panel-2:   #f8f8f4;
    --text:      #111111;
    --muted:     #333333;
    --faint:     #666666;
    --line:      #000000;
    --line-soft: rgba(0, 0, 0, 0.2);
    --red:       #bd0000;
    --red-ink:   #a30000;
    --red-soft:  rgba(189, 0, 0, 0.1);
    --rule-lines: rgba(0, 0, 0, 0.05);
    --vignette:   rgba(0, 0, 0, 0.05);
    --grain:      rgba(0, 0, 0, 0.03);
    --img: grayscale(1) contrast(1.2);
    --img-hover: grayscale(0.5) contrast(1.1);
}

/* =====================================================
   RESET & BASE
====================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    position: relative; min-height: 100vh;
    background: var(--bg); color: var(--text);
    font-family: var(--serif); font-size: 15px; font-weight: 400; line-height: 1.6;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

body::before {
    content: "CLASSIFIED DOSSIER // TOP SECRET CLEARANCE REQUIRED // NO UNAUTHORIZED DISTRIBUTION";
    display: block; background: var(--red); color: #fff; text-align: center;
    font-family: var(--display); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.2em; padding: 5px 0; position: relative; z-index: 1000;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 1px solid var(--red-ink); outline-offset: 2px; }

/* =====================================================
   LABEL & TYPOGRAPHY
====================================================== */
.section-title, .continuum-label, .experience-category, 
.development-meta, .contact-links a, .view-toggle, .tag, 
.experience-note strong, .nav-brand, .elegant-title, 
.profile-name, .profile-title, .experience-meta, 
.education-meta, .recognition-meta, .organization-period, 
.location, .speaking-meta, .continuum-step, .skill, footer {
    font-family: var(--display); text-transform: uppercase;
}
.section-title, .continuum-label, .experience-category, 
.development-meta, .contact-links a, .view-toggle, .tag, 
.experience-note strong { letter-spacing: var(--label-track); }

/* =====================================================
   ATMOSPHERE - SCANLINES
====================================================== */
.sky {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: linear-gradient(0deg, transparent 50%, var(--rule-lines) 50%);
    background-size: 100% 4px;
}
.sky::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 40%, var(--vignette) 150%);
}

nav, main, footer { position: relative; z-index: 1; }

/* =====================================================
   NAVIGATION
====================================================== */
nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem clamp(1.1rem, 5vw, 3.5rem);
    background: var(--bg-deep); border-bottom: 2px solid var(--line);
}
nav::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; background: var(--red); width: 120px;
}
.nav-brand {
    display: inline-flex; align-items: center; gap: 0.75rem;
    font-size: clamp(0.9rem, 1.7vw, 1.1rem); font-weight: 700;
    letter-spacing: 0.16em; color: var(--text);
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.nav-brand::before { content: "█"; font-size: 1.2em; color: var(--red); animation: blink 1s step-end infinite; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.view-toggle, .theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    height: 32px; background: transparent; color: var(--muted);
    border: 1px solid var(--line); cursor: pointer; transition: all 0.2s var(--ease);
}
.view-toggle { padding: 0 1rem; font-size: 0.75rem; font-weight: 700; }
.view-toggle:hover, .theme-toggle:hover { color: var(--bg); border-color: var(--text); background: var(--text); }
.theme-toggle { width: 32px; padding: 0; }
.theme-toggle svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
html[data-theme="dark"] .theme-toggle .icon-sun, html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* =====================================================
   LAYOUT
====================================================== */
main { width: var(--shell); margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) clamp(1.1rem, 5vw, 3.5rem); animation: sysBoot 0.4s step-start both; }
@keyframes sysBoot { 0% { opacity: 0; filter: invert(1); } 50% { opacity: 0.5; filter: none; } 100% { opacity: 1; } }

/* =====================================================
   HERO & HEADINGS (PROJECTS)
====================================================== */
.hero { padding-bottom: 2rem; }
.elegant-title {
    position: relative; max-width: 15ch; padding-left: 1.5rem;
    font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--text);
}
.elegant-title::before { content: ">_"; position: absolute; left: -0.2em; color: var(--red); font-size: 0.8em; }
.hero-subtitle { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); color: var(--muted); font-family: var(--serif); font-size: 0.95rem; }
.hero-subtitle::before { content: "STATUS: "; color: var(--red); font-family: var(--display); }

/* =====================================================
   PROJECT CARDS
====================================================== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.project-card {
    position: relative; display: flex; flex-direction: column; background: var(--bg-deep); border: 1px solid var(--line); transition: all 0.2s var(--ease);
}
.project-card::before {
    content: "[ ENCRYPTED FILE ]"; position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    background: var(--line); color: var(--faint); font-family: var(--display); font-size: 0.65rem; padding: 2px 8px; text-align: right;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--text); box-shadow: 4px 4px 0 var(--line); }
.project-card:hover::before { content: "[ DECRYPTED ]"; background: var(--red); color: #fff; }
.project-thumbnail { position: relative; overflow: hidden; aspect-ratio: 16/10; border-bottom: 1px solid var(--line); margin-top: 20px; }
.project-thumbnail img { width: 100%; height: 100%; object-fit: cover; filter: var(--img); transition: 0.3s; }
.project-card:hover .project-thumbnail img { filter: var(--img-hover); }
.project-content { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-title { font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.project-title::before { content: "DIR > "; color: var(--muted); font-size: 0.8em; }
.project-desc { flex-grow: 1; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { padding: 0.15rem 0.5rem; border: 1px solid var(--line); font-size: 0.65rem; color: var(--muted); }
.project-card:hover .tag { border-color: var(--text); color: var(--text); }

/* =====================================================
   PROFILE GRID
====================================================== */
.profile-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 4rem; align-items: start; }
.profile-sidebar { position: sticky; top: 100px; }

/* TARGETING CROSSHAIR PHOTO */
.photo-plate { position: relative; margin-bottom: 1.5rem; padding: 10px; background: var(--bg-deep); border: 1px solid var(--line); }
.photo-plate::after {
    content: ""; position: absolute; inset: -5px; border: 1px solid var(--red-soft); pointer-events: none;
    background:
        linear-gradient(to right, var(--red) 10%, transparent 10%) top left / 15px 2px no-repeat,
        linear-gradient(to bottom, var(--red) 10%, transparent 10%) top left / 2px 15px no-repeat,
        linear-gradient(to left, var(--red) 10%, transparent 10%) top right / 15px 2px no-repeat,
        linear-gradient(to bottom, var(--red) 10%, transparent 10%) top right / 2px 15px no-repeat,
        linear-gradient(to right, var(--red) 10%, transparent 10%) bottom left / 15px 2px no-repeat,
        linear-gradient(to top, var(--red) 10%, transparent 10%) bottom left / 2px 15px no-repeat,
        linear-gradient(to left, var(--red) 10%, transparent 10%) bottom right / 15px 2px no-repeat,
        linear-gradient(to top, var(--red) 10%, transparent 10%) bottom right / 2px 15px no-repeat;
}
.profile-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: var(--img); border: 1px solid var(--line); }
.photo-plate:hover .profile-photo { filter: var(--img-hover); }

.profile-name { font-size: 1.8rem; letter-spacing: 2px; margin-bottom: 0.2rem; }
.profile-title { font-size: 0.8rem; color: var(--red); border-bottom: 1px dashed var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
.profile-title::before { content: "ROLE: "; color: var(--muted); }
.profile-tagline { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.location { font-size: 0.75rem; color: var(--faint); margin-bottom: 1.5rem; }
.location::before { content: "LOC: "; color: var(--red); }

.contact-links { list-style: none; border-top: 1px solid var(--line); }
.contact-links li { border-bottom: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; padding: 0.75rem 0; font-size: 0.75rem; color: var(--muted); transition: 0.2s; }
.contact-links a::before { content: "[ "; color: var(--line); transition: 0.2s; }
.contact-links a::after { content: " ]"; color: var(--line); transition: 0.2s; }
.contact-links a:hover { color: var(--text); padding: 0.75rem 0.5rem; background: var(--line-soft); }
.contact-links a:hover::before, .contact-links a:hover::after { color: var(--red); }

/* =====================================================
   SECTIONS & HEADERS
====================================================== */
.resume-section { margin-bottom: 3.5rem; }
.section-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--text); }
.section-title::before { content: ">>"; color: var(--red); animation: blink 1.5s step-end infinite; }
.section-title::after { content: ""; flex: 1; height: 1px; background: repeating-linear-gradient(to right, var(--line) 0 4px, transparent 4px 8px); }

.summary { font-size: 0.95rem; color: var(--text); max-width: 70ch; text-align: justify; }
.summary strong { color: var(--red); background: var(--red-soft); padding: 0 4px; }

/* =====================================================
   CONTINUUM / TIMELINE
====================================================== */
.career-continuum { margin-top: 2rem; padding: 1.5rem; background: var(--bg-deep); border: 1px solid var(--line); border-left: 4px solid var(--red); }
.continuum-label { color: var(--red); font-size: 0.7rem; margin-bottom: 1rem; display: block; }
.continuum { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.continuum-step { padding: 0.25rem 0.75rem; background: var(--panel); border: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.continuum-step:last-of-type { background: var(--line); color: var(--text); border-color: var(--text); }
.continuum-arrow { color: var(--red); font-size: 0.8rem; }
.continuum-description { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: 0.85rem; color: var(--muted); }

/* =====================================================
   SKILLS & EXPERIENCE
====================================================== */
.skills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill { padding: 0.25rem 0.75rem; border: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.skill::before { content: "< "; color: var(--faint); } .skill::after { content: " />"; color: var(--faint); }
.skill:hover { background: var(--text); color: var(--bg-deep); border-color: var(--text); }
.skill:hover::before, .skill:hover::after { color: var(--bg-deep); }

.experience-item { position: relative; padding: 0 0 2rem 1.5rem; border-left: 1px solid var(--line); margin-left: 4px; }
.experience-item:last-child { border-left: 1px solid transparent; }
.experience-item::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; background: var(--bg); border: 1px solid var(--red); }
.experience-item:hover::before { background: var(--red); }
.experience-category { font-size: 0.65rem; color: var(--red); margin-bottom: 0.2rem; display: block;}
.experience-category::before { content: "[ "; } .experience-category::after { content: " ]"; }
.experience-item h3 { font-family: var(--display); font-size: 1.1rem; color: var(--text); margin-bottom: 0.2rem; }
.experience-meta { font-size: 0.75rem; color: var(--faint); margin-bottom: 0.75rem; }
.experience-item p { font-size: 0.85rem; color: var(--muted); max-width: 68ch; }

.experience-note { margin-top: 1rem; padding: 1rem; background: var(--bg-deep); border: 1px dashed var(--line); }
.experience-note strong { display: block; margin-bottom: 0.5rem; color: var(--text); font-size: 0.75rem; }
.experience-note strong::before { content: "OBSERVATION: "; color: var(--red); }

/* =====================================================
   LISTS (DEV, SPEAKING, EDU)
====================================================== */
.development-group { margin-bottom: 2rem; }
.development-heading { font-family: var(--display); font-size: 1rem; color: var(--text); margin-bottom: 0.2rem; }
.development-meta { font-size: 0.7rem; color: var(--red); margin-bottom: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.5rem; }
.credential-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.credential-list li { position: relative; padding-left: 1rem; font-size: 0.85rem; color: var(--muted); }
.credential-list li::before { content: ">"; position: absolute; left: 0; color: var(--red); font-family: var(--display); }
.credential-list strong { color: var(--text); display: block; font-size: 0.75rem; }

.speaking-list { list-style: none; }
.speaking-year { display: flex; align-items: center; gap: 1rem; color: var(--red); font-size: 0.85rem; margin-top: 1.5rem; padding-bottom: 0.5rem; }
.speaking-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.speaking-item { padding: 0.75rem 0; border-bottom: 1px dashed var(--line); transition: 0.2s; }
.speaking-item:hover { padding-left: 10px; background: var(--bg-deep); border-left: 2px solid var(--red); }
.speaking-title { font-size: 0.9rem; color: var(--text); }
.speaking-meta { font-size: 0.7rem; color: var(--faint); margin-top: 0.2rem; }

.education-item, .recognition-item { padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.education-item h3, .recognition-item h3 { font-family: var(--display); font-size: 1.1rem; color: var(--text); margin-bottom: 0.2rem; }
.education-meta, .recognition-meta { font-size: 0.75rem; color: var(--red); margin-bottom: 0.5rem; }
.education-item p, .recognition-item p { font-size: 0.85rem; color: var(--muted); }

.organization-item { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px dashed var(--line); }
.organization-name { font-size: 0.9rem; color: var(--text); }
.organization-period { font-size: 0.75rem; color: var(--red); }

/* =====================================================
   FOOTER & RESPONSIVE
====================================================== */
footer {
    padding: 2rem; border-top: 1px solid var(--line); text-align: center;
    font-size: 0.65rem; color: var(--faint); letter-spacing: 0.2em; margin-top: 2rem;
}

@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; gap: 2rem; }
    .profile-sidebar { position: static; display: grid; grid-template-columns: 180px 1fr; gap: 2rem; align-items: start; }
    .photo-plate { grid-row: 1 / span 5; margin-bottom: 0; }
    .contact-links { grid-column: 1 / -1; margin-top: 1rem; }
    .credential-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .profile-sidebar { grid-template-columns: 1fr; gap: 1rem; }
    .photo-plate { grid-row: auto; max-width: 200px; }
    .elegant-title { font-size: 1.8rem; }
}

/* =====================================================
   CREDENTIAL BADGES (LENCANA)
====================================================== */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.badge-item {
    position: relative;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s var(--ease);
}

.badge-item::before {
    content: "[ ID ]";
    position: absolute;
    top: -8px;
    left: 8px;
    background: var(--bg);
    color: var(--faint);
    font-size: 0.55rem;
    padding: 0 4px;
}

.badge-item:hover {
    border-color: var(--red);
    transform: translateY(-3px);
    box-shadow: 4px 4px 0 var(--line);
}

.badge-item:hover::before {
    color: var(--red);
}

.badge-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    filter: var(--img);
    transition: filter 0.4s var(--ease);
}

.badge-item:hover img {
    filter: grayscale(0) contrast(1.1);
}

.badge-label {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--line);
    font-size: 0.65rem;
    color: var(--muted);
    font-family: var(--display);
    letter-spacing: 0.1em;
}

/* =====================================================
   PROJECT FILTERS / SORTING
====================================================== */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 1.5rem;
}

.filter-btn {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 0.4rem 1.2rem;
    font-family: var(--display);
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.filter-btn::before {
    content: "[ ";
    color: var(--line);
    transition: all 0.2s var(--ease);
}
.filter-btn::after {
    content: " ]";
    color: var(--line);
    transition: all 0.2s var(--ease);
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--text);
    background: var(--line-soft);
}
.filter-btn:hover::before, .filter-btn:hover::after {
    color: var(--text);
}

.filter-btn.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 3px 3px 0 var(--line);
}
.filter-btn.active::before, .filter-btn.active::after {
    color: #fff;
}