* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    transition: background-color 0.5s;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Interactive Canvas */
#cyber-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.cyber-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--theme-color);
    text-shadow: 0 0 10px var(--theme-shadow);
    transition: color 0.5s, text-shadow 0.5s;
}

.nav-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lang-switch,
.hr-switch {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
}

.lang-switch span.active {
    color: var(--theme-color);
    font-weight: bold;
}

/* HR Toggle */
.hr-switch .toggle-box {
    width: 36px;
    height: 18px;
    background: #333;
    border-radius: 9px;
    position: relative;
    transition: background 0.3s;
}

.hr-switch.active .toggle-box {
    background: var(--theme-color);
}

.toggle-knob {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.hr-switch.active .toggle-knob {
    left: 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-sub);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: var(--theme-color);
    text-shadow: 0 0 8px var(--theme-shadow);
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
.hr-switch:focus-visible,
.lang-switch:focus-visible {
    outline: 2px solid var(--theme-color);
    outline-offset: 2px;
}

.contact-card:focus-visible,
.p-item:focus-visible {
    outline: 2px solid var(--theme-color);
    outline-offset: 4px;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 20px;
    /* Top padding for nav */
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--theme-color);
    box-shadow: 0 0 20px var(--theme-shadow);
    margin-bottom: 30px;
    object-fit: cover;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-content .subtitle {
    font-family: var(--font-sub);
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-dim);
    letter-spacing: 5px;
    margin-bottom: 30px;
}

.roles {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.separator {
    color: var(--text-dim);
    margin: 0 15px;
}

.tagline {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--text-dim);
}

/* Hero CTA - Download CV */
.hero-cta {
    margin-top: 35px;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--theme-color);
    text-decoration: none;
    border: 1px solid var(--theme-color);
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.05);
    transition: all 0.3s;
}

.cv-btn svg {
    width: 18px;
    height: 18px;
}

.cv-btn:hover {
    background: var(--theme-color);
    color: #050505;
    box-shadow: 0 0 25px var(--theme-shadow);
    transform: translateY(-2px);
}

body.recruiter-mode .cv-btn {
    color: #0056b3;
    border-color: #0056b3;
    background: #fff;
}

body.recruiter-mode .cv-btn:hover {
    background: #0056b3;
    color: #fff;
}

/* Sections General */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

section {
    margin-bottom: 150px;
    scroll-margin-top: 100px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    padding: 10px;
    border-bottom: 2px solid var(--theme-color);
    transition: border-color 0.5s;
}

/* About & Goals */
.about-text {
    white-space: pre-wrap;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #ddd;
}

.goals-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.goal-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-left: 2px solid var(--theme-color);
}

.goal-item h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--theme-color);
}

.goal-item p {
    font-size: 0.9rem;
    color: #ccc;
}

/* Experience */
.exp-card {
    background: rgba(10, 10, 10, 0.7);
    padding: 30px;
    border: 1px solid #333;
    border-left: 4px solid var(--theme-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.exp-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.company-logo {
    width: 60px;
    height: auto;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

.exp-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
}

.exp-company {
    font-family: var(--font-heading);
    color: var(--theme-color);
    font-size: 1.1rem;
    display: block;
    margin: 5px 0;
}

.exp-date {
    font-family: var(--font-sub);
    color: var(--text-dim);
    font-size: 0.9rem;
}

.exp-list {
    padding-left: 20px;
}

.exp-list li {
    margin-bottom: 8px;
    color: #ccc;
}

/* Dashboard */
.dashboard-container {
    background: rgba(10, 12, 16, 0.8);
    border: 1px solid var(--theme-color);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 50px;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-tag {
    font-family: var(--font-sub);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    border: 1px solid #444;
    border-radius: 3px;
    padding: 3px 8px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--neon-red);
    border-radius: 50%;
    animation: blink 1s infinite;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dash-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.stat-value {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--theme-color);
}

.bar-chart {
    display: flex;
    gap: 5px;
    height: 50px;
    align-items: flex-end;
}

.bar-col {
    flex: 1;
    background: #222;
    height: 100%;
    position: relative;
}

.bar-col .fill {
    background: var(--theme-color);
    width: 100%;
    position: absolute;
    bottom: 0;
    transition: height 0.5s ease;
}

.dash-log {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
    padding-top: 10px;
    border-top: 1px solid #333;
}

/* Mindset */
.mindset-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.mindset-card {
    padding: 25px;
    border-radius: 4px;
    background: rgba(20, 20, 20, 0.5);
}

.blue-card {
    border-top: 3px solid var(--neon-blue);
}

.red-card {
    border-top: 3px solid var(--neon-red);
}

.mindset-card h3 {
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.mindset-card p {
    font-family: var(--font-body);
    color: #ccc;
    font-style: italic;
    border-left: 2px solid #444;
    padding-left: 15px;
}

/* Dual Team Section */
.dual-section-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.team-section {
    background: rgba(10, 10, 10, 0.5);
    padding: 30px;
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-section:hover {
    transform: translateY(-5px);
}

.blue-border {
    border-left: 3px solid var(--neon-blue);
}

.red-border {
    border-right: 3px solid var(--neon-red);
    text-align: right;
}

.team-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.card-grid {
    display: grid;
    gap: 20px;
}

.cyber-card {
    background: #111;
    padding: 20px;
    border: 1px solid #222;
}

.cyber-card h3 {
    font-family: var(--font-sub);
    font-size: 1rem;
    margin-bottom: 5px;
    color: #fff;
}

.cyber-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Skills & Tools */
.skills-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.tools-groups {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tool-group-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-left: 5px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: rgba(20, 20, 20, 0.5);
    padding: 20px;
    border: 1px solid #333;
}

.tool-group .tools-grid {
    grid-template-columns: repeat(3, 1fr);
}

.tool-item {
    background: #111;
    padding: 20px;
    text-align: center;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    border: 1px solid #222;
    transition: all 0.3s;
    cursor: default;
    color: var(--text-main);
}

.tool-item:hover {
    background: #151515;
    border-color: var(--theme-color);
    color: var(--theme-color);
    text-shadow: 0 0 10px var(--theme-shadow);
    transform: scale(1.05);
}

/* Featured Certification */
/* Featured Certification */
.featured-cert-container {
    margin-bottom: 0;
    /* Handled by section spacing */
    text-align: center;
}

/* Two featured certificates side by side */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    align-items: stretch;
}

.featured-grid .featured-card {
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-grid .featured-details {
    flex: 1;
}

/* CyberShield (CSCSA) accent — blue instead of Red Hat red */
.cscsa-card:hover {
    border-color: #1a8fd1;
    box-shadow: 0 0 30px rgba(26, 143, 209, 0.25);
}

.featured-details .issuer.cyan-issuer {
    color: #1a8fd1;
}

body.recruiter-mode .cscsa-card:hover {
    border-color: #bbb;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

body.recruiter-mode .featured-details .issuer.cyan-issuer {
    color: #0056b3;
}

/* Stack the two featured cards on smaller screens */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.featured-header p {
    color: var(--text-dim);
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-family: var(--font-sub);
    letter-spacing: 1px;
}

.featured-card {
    background: #0f0f0f;
    border: 1px solid #333;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    /* 12px requested */
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

.featured-card:hover {
    transform: scale(1.03);
    /* 1.03 requested */
    border-color: #ee0000;
    /* Red Hat Red */
    box-shadow: 0 0 30px rgba(238, 0, 0, 0.2);
}

.featured-img-wrapper {
    position: relative;
    width: 100%;
    /* border-bottom: 1px solid #222; Remove border if image covers well */
}

.featured-img {
    width: 100%;
    display: block;
    height: auto;
}

.featured-details {
    padding: 25px;
    text-align: left;
    background: linear-gradient(to right, #111, #0a0a0a);
}

.featured-details h3 {
    color: #fff;
    font-family: var(--font-sub);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.featured-details .issuer {
    color: #ee0000;
    /* Red Hat Red */
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.featured-details .holder {
    font-size: 0.9rem;
    color: #888;
}

.white-text {
    color: #fff;
}

/* Recruiter Mode Override for Featured */
body.recruiter-mode .featured-card {
    background: #fff;
    border-color: #ddd;
    box-shadow: none;
}

body.recruiter-mode .featured-header h3 {
    color: #c00;
}

/* Dark Red */
body.recruiter-mode .featured-details {
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

body.recruiter-mode .featured-details h3 {
    color: #000;
}

body.recruiter-mode .featured-card:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: #bbb;
}

body.recruiter-mode .featured-details .issuer {
    color: #d00;
}

/* Archives (Layout) */
.archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.archive-card {
    background: radial-gradient(circle at top right, #1a1a1a, #0a0a0a);
    padding: 30px;
    border: 1px solid #222;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}

.archive-card:hover {
    border-color: var(--theme-color);
}

.card-top {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.university-logo {
    width: 50px;
    height: auto;
    margin-bottom: 10px;
}

/* Certificate Grid (Strict Responsive Layout) */
.cert-grid-title h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-size: 1.2rem;
    border-left: 3px solid var(--theme-color);
    padding-left: 15px;
}

.cert-grid {
    display: grid;
    gap: 30px;
    /* Default (Mobile) */
    grid-template-columns: 1fr;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cert-item {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 20px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    cursor: pointer;
}

.cert-item:hover {
    transform: scale(1.05);
    border-color: var(--theme-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

/* Red theme hover override would be handled by theme vars preferably,
   but box-shadow is hardcoded. Let's make it theme-dependent logic if needed,
   or just subtle. */

.cert-preview {
    height: 180px;
    background: #000;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #222;
    border-radius: 4px;
}

.cert-preview img {
    max-width: 100%;
    max-height: 100%;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}

.cert-item:hover .cert-preview img {
    opacity: 1;
    transform: scale(1.05);
}

.cert-item h4 {
    font-family: var(--font-sub);
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-item p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.mono {
    font-family: monospace;
    color: var(--theme-color);
}

/* Recruiter Mode Override for Grid */
body.recruiter-mode .cert-item {
    background: #fff;
    border-color: #ddd;
    color: #333;
    box-shadow: none;
}

body.recruiter-mode .cert-item:hover {
    transform: none;
    /* Disable scale */
    border-color: #bbb;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.recruiter-mode .cert-item h4 {
    color: #000;
}

body.recruiter-mode .cert-preview {
    border-color: #eee;
    background: #f9f9f9;
}


/* Languages and Projects */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.lang-list li {
    list-style: none;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bar {
    height: 4px;
    background: #222;
    width: 150px;
    position: relative;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--purple);
    box-shadow: 0 0 5px var(--purple);
}

.bar.full::after {
    width: 100%;
}

.bar.high::after {
    width: 90%;
}

.bar.med-high::after {
    width: 75%;
}

.p-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #333;
    background: rgba(255, 255, 255, 0.02);
    display: block;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.p-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--theme-color);
    transform: translateX(5px);
}

.p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.p-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.diploma-badge {
    font-family: var(--font-heading);
    font-size: 0.55rem;
    letter-spacing: 1.5px;
    color: var(--purple);
    border: 1px solid var(--purple);
    border-radius: 4px;
    padding: 2px 7px;
    text-shadow: 0 0 6px var(--purple);
    white-space: nowrap;
}

body.recruiter-mode .diploma-badge {
    color: #0056b3;
    border-color: #0056b3;
    text-shadow: none;
}

.p-item h4 {
    color: var(--text-main);
    font-family: var(--font-sub);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.p-item:hover h4 {
    color: var(--theme-color);
}

.external-icon {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    color: var(--theme-color);
}

.p-item:hover .external-icon {
    opacity: 1;
    transform: translateX(0);
}

.external-icon svg {
    width: 18px;
    height: 18px;
}

.p-item p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Contact */
/* Contact */
.contact-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact-container .subtitle {
    margin-bottom: 40px;
    color: var(--text-dim);
    font-size: 1.1rem;
    font-family: var(--font-sub);
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid #333;
    padding: 25px 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 250px;
    backdrop-filter: blur(5px);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.icon-wrapper svg {
    width: 28px;
    height: 28px;
    stroke: #aaa;
    transition: stroke 0.3s;
}

.card-details {
    text-align: left;
}

.card-details h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 4px;
}

.card-details p {
    font-family: var(--font-sub);
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Email Card: White/Cyan Glow */
.email-card:hover {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(0, 255, 255, 0.1);
    transform: scale(1.05);
}

.email-card:hover .icon-wrapper svg {
    stroke: #fff;
}

/* Telegram Card: Blue Glow */
.telegram-card:hover {
    border-color: #0088cc;
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.4);
    transform: scale(1.05);
}

.telegram-card:hover .icon-wrapper svg {
    stroke: #0088cc;
}

/* Instagram Card: Pink/Purple Glow */
.instagram-card:hover {
    border-color: #d62976;
    box-shadow: 0 0 20px rgba(214, 41, 118, 0.4);
    transform: scale(1.05);
}

.instagram-card:hover .icon-wrapper svg {
    stroke: #d62976;
}

/* LinkedIn Card: Blue Glow */
.linkedin-card:hover {
    border-color: #0077b5;
    box-shadow: 0 0 20px rgba(0, 119, 181, 0.4);
    transform: scale(1.05);
}

.linkedin-card:hover .icon-wrapper svg {
    stroke: #0077b5;
}

/* GitHub Card: White Glow */
.github-card:hover {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.github-card:hover .icon-wrapper svg {
    stroke: #fff;
}

body.recruiter-mode .github-card:hover .icon-wrapper svg {
    stroke: #333;
}

/* Mobile Contact Layout */
@media (max-width: 768px) {
    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 0;
    background: #080808;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Recruiter Mode Overrides - Specifics */
body.recruiter-mode #cyber-canvas,
body.recruiter-mode .scanline,
body.recruiter-mode .background-grid,
body.recruiter-mode .glitch-layer {
    display: none !important;
}

body.recruiter-mode .cyber-card,
body.recruiter-mode .team-section,
body.recruiter-mode .skill-column,
body.recruiter-mode .archive-card,
body.recruiter-mode .exp-card,
body.recruiter-mode .mindset-card,
body.recruiter-mode #about,
body.recruiter-mode .tools-grid,
body.recruiter-mode .tool-item {
    background: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #333;
}

body.recruiter-mode * {
    text-shadow: none !important;
    box-shadow: none !important;
}

body.recruiter-mode .theme-switch,
body.recruiter-mode .lang-switch,
body.recruiter-mode .hr-switch {
    background: #e4e6eb;
    border-color: #ccc;
    color: #333;
}

/* Recruiter Mode - Contact Overrides */
body.recruiter-mode .contact-card {
    background: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: none !important;
    backdrop-filter: none;
}

body.recruiter-mode .contact-card:hover {
    background: #f8f9fa;
    border-color: #bbb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.recruiter-mode .p-item {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.recruiter-mode .p-item:hover {
    background: #fdfdfd;
    border-color: #bbb;
    transform: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

body.recruiter-mode .p-item h4 {
    color: #000;
}

body.recruiter-mode .p-item:hover h4 {
    color: #cc0000;
    /* Darker red highlight */
    text-shadow: none;
}

body.recruiter-mode .p-item p {
    color: #555;
}

body.recruiter-mode .external-icon {
    color: #cc0000;
}

body.recruiter-mode .card-details h3 {
    color: #333;
}

body.recruiter-mode .card-details p {
    color: #555;
}

body.recruiter-mode .icon-wrapper svg {
    stroke: #555;
}

body.recruiter-mode .email-card:hover .icon-wrapper svg {
    stroke: #333;
}

body.recruiter-mode .telegram-card:hover .icon-wrapper svg {
    stroke: #0088cc;
}

body.recruiter-mode .instagram-card:hover .icon-wrapper svg {
    stroke: #d62976;
}

body.recruiter-mode .linkedin-card:hover .icon-wrapper svg {
    stroke: #0077b5;
}

/* Media Queries */
@media (max-width: 900px) {
    .cyber-nav {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        position: relative;
    }

    .nav-controls {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #hero {
        padding-top: 50px;
    }
}

@media (max-width: 768px) {

    .dual-section-container,
    .card-grid,
    .two-col-layout,
    .skills-container,
    .goals-container,
    .mindset-container {
        grid-template-columns: 1fr;
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid,
    .tool-group .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Mobile spacing: tighten the big desktop gaps --- */
    main {
        padding: 24px 16px;
    }

    section {
        margin-bottom: 70px;
        scroll-margin-top: 80px;
    }

    .two-col-layout {
        gap: 35px;
    }

    .section-title h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    /* Red team text alignment back to left on mobile */
    .red-border {
        text-align: left;
        border-right: none;
        border-left: 3px solid var(--neon-red);
    }

    /* --- Experience cards: stack logo above text, give text full width --- */
    .exp-card {
        padding: 20px;
    }

    .exp-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }

    .exp-header h3 {
        font-size: 1.2rem;
    }

    .company-logo {
        width: 50px;
    }

    .exp-list {
        padding-left: 18px;
    }

    /* --- Dashboard bar chart a touch taller so it reads on mobile --- */
    .dash-visual {
        margin-top: 5px;
    }

    .bar-chart {
        height: 70px;
    }

    /* CV button full-width tap target */
    .hero-cta {
        width: 100%;
    }

    .cv-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

/* --- Very small phones --- */
@media (max-width: 480px) {

    .nav-links {
        gap: 10px 14px;
        font-size: 0.8rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    section {
        margin-bottom: 55px;
    }

    /* One tool per row so labels never get cramped */
    .tools-grid,
    .tool-group .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-item {
        padding: 14px;
        text-align: left;
        padding-left: 20px;
    }

    .contact-card {
        min-width: 0;
        padding: 18px 20px;
    }

    .featured-details h3 {
        font-size: 1.1rem;
    }
}

/* ===================================================================
   Floating Section Navigation (dot rail + prev/next flip buttons)
   =================================================================== */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Dot rail */
.section-rail {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.rail-dot {
    position: relative;
    width: 13px;
    height: 13px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--text-dim);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.rail-dot:hover {
    border-color: var(--theme-color);
    transform: scale(1.15);
}

.rail-dot.active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    box-shadow: 0 0 12px var(--theme-shadow);
    transform: scale(1.2);
}

.rail-label {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: var(--theme-color);
    background: rgba(5, 5, 5, 0.9);
    border: 1px solid var(--theme-color);
    border-radius: 4px;
    padding: 4px 9px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.rail-dot:hover .rail-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Prev / Next flip buttons */
.flip-nav {
    position: fixed;
    right: 22px;
    bottom: 26px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flip-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--theme-color);
    background: rgba(5, 5, 5, 0.8);
    color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.3s;
}

.flip-btn svg {
    width: 22px;
    height: 22px;
}

.flip-btn:hover {
    background: var(--theme-color);
    color: #050505;
    box-shadow: 0 0 18px var(--theme-shadow);
    transform: translateY(-2px);
}

.flip-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Recruiter (HR) mode */
body.recruiter-mode .rail-dot {
    border-color: #999;
}

body.recruiter-mode .rail-dot.active {
    background: #0056b3;
    border-color: #0056b3;
}

body.recruiter-mode .rail-label {
    color: #0056b3;
    background: #fff;
    border-color: #0056b3;
}

body.recruiter-mode .flip-btn {
    border-color: #0056b3;
    color: #0056b3;
    background: #fff;
}

body.recruiter-mode .flip-btn:hover {
    background: #0056b3;
    color: #fff;
}

/* Hide the canvas particles glow under buttons isn't needed; keep accessible focus */
.rail-dot:focus-visible,
.flip-btn:focus-visible {
    outline: 2px solid var(--theme-color);
    outline-offset: 3px;
}

/* Responsive: keep it tidy on tablets / phones */
@media (max-width: 900px) {
    .section-rail {
        right: 12px;
        gap: 13px;
    }

    .rail-dot {
        width: 11px;
        height: 11px;
    }

    /* Labels can overlap content on small screens — show only on real hover devices */
    .rail-label {
        display: none;
    }

    .flip-nav {
        right: 14px;
        bottom: 18px;
    }

    .flip-btn {
        width: 42px;
        height: 42px;
    }
}

/* Very small phones: drop the dot rail, keep the flip arrows (core "перелистать") */
@media (max-width: 520px) {
    .section-rail {
        display: none;
    }
}

/* ===================================================================
   Mobile App-style Bottom Tab Bar
   =================================================================== */
.bottom-tabs {
    display: none;
    /* shown only on mobile */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1002;
    justify-content: space-around;
    align-items: stretch;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px 2px;
    font-family: var(--font-sub);
    transition: color 0.25s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.tab-btn svg {
    width: 23px;
    height: 23px;
    transition: filter 0.25s, transform 0.2s;
}

.tab-btn .tab-label {
    font-size: 0.6rem;
    letter-spacing: 0.4px;
    line-height: 1;
}

.tab-btn:active {
    transform: scale(0.92);
}

.tab-btn.active {
    color: var(--theme-color);
}

.tab-btn.active svg {
    filter: drop-shadow(0 0 7px var(--theme-shadow));
    transform: translateY(-1px);
}

/* HR (recruiter) mode */
body.recruiter-mode .bottom-tabs {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
}

body.recruiter-mode .tab-btn {
    color: #777;
}

body.recruiter-mode .tab-btn.active {
    color: #0056b3;
}

/* Show the tab bar on mobile, hide the desktop floating nav, lift content above the bar */
@media (max-width: 768px) {
    .bottom-tabs {
        display: flex;
    }

    .section-rail,
    .flip-nav {
        display: none !important;
    }

    body {
        padding-bottom: 70px;
    }

    footer {
        margin-bottom: 0;
    }
}

/* Extra-tight phones: trim label size a touch so 5 tabs always fit */
@media (max-width: 360px) {
    .tab-btn .tab-label {
        font-size: 0.55rem;
    }

    .tab-btn svg {
        width: 21px;
        height: 21px;
    }
}

/* ===================================================================
   HR / Recruiter View — clean summary card (only shown in HR mode)
   =================================================================== */
.hr-banner {
    display: none;
    /* hidden in normal portfolio mode */
}

/* In HR mode: hide the flashy hero + decorative sections, show the summary */
body.recruiter-mode #hero,
body.recruiter-mode #dashboard,
body.recruiter-mode #mindset {
    display: none;
}

body.recruiter-mode .hr-banner {
    display: block;
    background: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 60px;
    margin-top: 10px;
}

.hr-top {
    display: flex;
    gap: 26px;
    align-items: center;
}

.hr-photo {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0056b3;
    flex-shrink: 0;
}

.hr-id h1 {
    font-size: 1.9rem;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.15;
}

.hr-role {
    color: #0056b3;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.hr-loc {
    color: #5a5f66;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.hr-loc::before {
    content: "📍 ";
}

.hr-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hr-btn {
    padding: 10px 18px;
    border-radius: 7px;
    border: 1px solid #0056b3;
    color: #0056b3;
    background: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.hr-btn:hover {
    background: #eef4fb;
}

.hr-btn.primary {
    background: #0056b3;
    color: #ffffff;
}

.hr-btn.primary:hover {
    background: #00408a;
}

.hr-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #eceef1;
}

.hr-fact {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hr-fact-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #8a909a;
    font-weight: 600;
}

.hr-fact-val {
    color: #20242b;
    font-size: 0.92rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    body.recruiter-mode .hr-banner {
        padding: 24px 18px;
    }

    .hr-top {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .hr-actions {
        justify-content: center;
    }

    .hr-facts {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ===================================================================
   Intro / boot animation
   =================================================================== */
body.intro-active {
    overflow: hidden;
}

#intro-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: radial-gradient(circle at 50% 45%, #0a0e16 0%, #050505 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s ease;
    cursor: pointer;
}

#intro-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.intro-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    transform: perspective(400px) rotateX(60deg);
    animation: introGridMove 6s linear infinite;
    opacity: 0.5;
}

@keyframes introGridMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 44px;
    }
}

.intro-inner {
    position: relative;
    text-align: center;
    z-index: 1;
    animation: introFadeUp 0.6s ease both;
}

@keyframes introFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-shield {
    color: var(--neon-blue);
    margin-bottom: 18px;
    filter: drop-shadow(0 0 14px var(--neon-blue));
    animation: introPulse 1.4s ease-in-out infinite;
}

.intro-shield svg {
    width: 64px;
    height: 64px;
    stroke-dasharray: 90;
    stroke-dashoffset: 90;
    animation: introDraw 1.1s ease forwards;
}

@keyframes introDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes introPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 10px var(--neon-blue));
    }

    50% {
        filter: drop-shadow(0 0 22px var(--neon-blue));
    }
}

.intro-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2.4rem, 11vw, 4.2rem);
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
    animation: introFlicker 1.6s steps(1) infinite;
}

.intro-logo span {
    color: var(--neon-blue);
}

@keyframes introFlicker {

    0%,
    18%,
    22%,
    60%,
    64%,
    100% {
        opacity: 1;
    }

    20%,
    62% {
        opacity: 0.55;
    }
}

.intro-bar {
    width: min(260px, 62vw);
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    margin: 26px auto 14px;
    overflow: hidden;
}

.intro-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--neon-blue);
    box-shadow: 0 0 12px var(--neon-blue);
    animation: introLoad 2s ease forwards;
}

@keyframes introLoad {
    0% {
        width: 0;
    }

    70% {
        width: 88%;
    }

    100% {
        width: 100%;
    }
}

.intro-status {
    font-family: var(--font-sub);
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: var(--text-dim);
    animation: introBlink 1s step-end infinite;
}

@keyframes introBlink {

    0%,
    100% {
        opacity: 0.9;
    }

    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {

    .intro-grid,
    .intro-shield,
    .intro-shield svg,
    .intro-logo,
    .intro-bar-fill,
    .intro-status {
        animation: none;
    }

    .intro-shield svg {
        stroke-dashoffset: 0;
    }
}