/* 
 * NOUR ABID | Cybersecurity Engineering Portfolio
 * UI Architecture Refactor
 * Implemented Systems: Global Spacing, Typography Hierarchy, Layout Grid, Animation Discipline.
 */

/* -------------------------------------------------------------------------- */
/* 0. DESIGN TOKENS                                                           */
/* -------------------------------------------------------------------------- */

:root {
    /* --- Refined Indigo & Amber Palette --- */
    --bg-black: #12121a;
    /* Lighter deep indigo-night */
    --bg-card: rgba(26, 26, 42, 0.7);
    --bg-elevation: rgba(35, 35, 55, 0.85);

    --accent-primary: #6e56cf;
    /* Deep Indigo-Purple */
    --accent-secondary: #e9b96e;
    /* Amber-Yellow */
    --accent-success: #8ae234;
    /* Terminal Green */
    --accent-glow: rgba(110, 86, 207, 0.25);

    /* UI Consistency */
    --accent-cyan: var(--accent-primary);
    --accent-purple: var(--accent-primary);
    --accent-blue: var(--accent-primary);
    --accent-coral: var(--accent-secondary);

    --text-primary: #ffffff;
    --text-secondary: #e2e2e8;
    --text-muted: #8e8e9c;

    --border: rgba(110, 86, 207, 0.2);
    --border-bright: rgba(110, 86, 207, 0.4);

    /* --- Spacing System (8px based) --- */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    --space-7: 96px;
    --space-8: 128px;

    /* --- Typography Hierarchy --- */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Inter', sans-serif;

    /* Type Scale */
    --fs-h1: clamp(40px, 5vw, 56px);
    --fs-h2: clamp(28px, 3vw, 36px);
    --fs-h3: 22px;
    --fs-body: clamp(16px, 2vw, 18px);
    --fs-small: 14px;

    /* --- Layout --- */
    --container-max-width: 1200px;
    --container-padding: 40px;
    --section-padding-v: 80px;

    /* --- Transitions --- */
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fade: 0.6s ease-out;
}

/* -------------------------------------------------------------------------- */
/* 1. BASE STYLES                                                             */
/* -------------------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 50% -20%, rgba(110, 86, 207, 0.15) 0%, transparent 85%),
        linear-gradient(rgba(110, 86, 207, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 86, 207, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 80px 80px, 80px 80px;
}

/* Typography Reset */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: var(--space-2);
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

p {
    margin-bottom: var(--space-3);
    max-width: 65ch;
    /* Optimal line length */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* Blinking Underscore for Headings */
h1::after,
.terminal-title::after {
    content: '_';
    color: var(--accent-secondary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* -------------------------------------------------------------------------- */
/* 2. LAYOUT GRID SYSTEM                                                      */
/* -------------------------------------------------------------------------- */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding-v) 0;
    position: relative;
    scroll-margin-top: 80px;
}

.section-header {
    margin-bottom: var(--space-4);
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(233, 185, 110, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(233, 185, 110, 0.3);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-4);
}

/* -------------------------------------------------------------------------- */
/* 3. NAVIGATION                                                              */
/* -------------------------------------------------------------------------- */

.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-4) 0;
    background: linear-gradient(to bottom, var(--bg-black) 0%, transparent 100%);
    transition: var(--transition-smooth);
}

.glass-nav.scrolled {
    padding: var(--space-3) 0;
    background: rgba(12, 5, 15, 0.9);
    /* Darker Ubuntu glass */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent-secondary);
}

.nav-links {
    display: flex;
    gap: var(--space-5);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-cyan);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Language Switcher --- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition-smooth);
}

.hamburger {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: var(--transition-smooth);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

.hamburger::before {
    transform: translateY(-6px);
}

.hamburger::after {
    transform: translateY(6px);
}

/* Toggle Animation */
.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
}

.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-bright);
    border-radius: 8px;
    padding: 8px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-cyan);
}

/* -------------------------------------------------------------------------- */
/* 4. HERO SECTION                                                            */
/* -------------------------------------------------------------------------- */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-black);
    padding-top: 100px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-6);
    align-items: center;
}

.hero-greeting {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-3);
    opacity: 0.9;
}

.hero-name {
    margin-bottom: var(--space-3);
}

.hero-name span {
    color: var(--accent-secondary);
    text-shadow: 0 0 20px rgba(233, 185, 110, 0.2);
}

.hero-title {
    font-size: var(--fs-h2);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

#typing-text {
    color: var(--accent-secondary);
    font-weight: 600;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
    max-width: 550px;
    line-height: 1.6;
}

.hero-highlight {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: inline-block;
    margin: 6px 0;
    text-shadow: 0 0 10px rgba(142, 142, 156, 0.5);
    letter-spacing: 0.02em;
}

.hero-ctas {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* -------------------------------------------------------------------------- */
/* 5. BUTTONS                                                                 */
/* -------------------------------------------------------------------------- */

.btn {
    padding: var(--space-2) var(--space-4);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1rem;
    border-radius: 12px;
    /* Synced with cards */
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(110, 86, 207, 0.3);
}

.btn-primary:hover {
    background: #5c4bbd;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(110, 86, 207, 0.4);
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: none;
}

.btn-secondary:hover {
    background: #e5e5e5;
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
    transform: translateY(-3px);
}

/* -------------------------------------------------------------------------- */
/* 6. COMPONENTS (Standardized)                                               */
/* -------------------------------------------------------------------------- */

/* Common Card Base */
.about-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: linear-gradient(135deg, #12050f 0%, #050104 100%);
    border: 1px solid var(--border-bright);
    border-radius: 20px;
    padding: var(--space-5);
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 0% 0%, rgba(110, 86, 207, 0.1), transparent 60%);
    pointer-events: none;
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-2);
}

.about-title {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--text-primary);
}

.about-status {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(114, 159, 207, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    border-radius: 4px;
    text-transform: uppercase;
}

.about-body {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: var(--space-5);
    align-items: start;
}

.about-main-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.about-stats-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: var(--space-3);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.2);
}

.stat-label {
    display: block;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-heading);
}

.about-footer {
    border-top: 1px solid var(--border);
    padding-top: var(--space-3);
}

.about-highlights {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.about-highlights li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.about-highlights svg {
    stroke: var(--accent-secondary);
    /* Amber icon accents */
}

.timeline-content,
.project-card,
.skill-category,
.cert-card,
.contact-item {
    background: linear-gradient(135deg, #12050f 0%, #050104 100%);
    border: 1px solid var(--border-bright);
    border-radius: 20px;
    padding: var(--space-5);
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    backdrop-filter: blur(15px);
}

.about-card:hover,
.timeline-content:hover,
.project-card:hover,
.skill-category:hover,
.cert-card:hover,
.contact-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(110, 86, 207, 0.1);
}

.about-card:hover::before,
.project-card:hover::before {
    opacity: 1;
}

/* --- Education --- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-4);
}

.education-card {
    background: linear-gradient(135deg, #12050f 0%, #050104 100%);
    border: 1px solid var(--border-bright);
    border-radius: 20px;
    padding: var(--space-5);
    transition: var(--transition-smooth);
    backdrop-filter: blur(15px);
}

.education-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(233, 185, 110, 0.15);
}

.edu-header {
    margin-bottom: var(--space-3);
}

.edu-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 4px;
}

.edu-degree {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.edu-school {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.edu-bullets {
    list-style: none;
}

.edu-bullets li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.edu-bullets li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
}

/* --- Experience --- */
.timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    padding: var(--space-4) 0;
}

.timeline-content {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: var(--space-5);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    border-color: var(--accent-cyan);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.timeline-title-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.timeline-role {
    font-size: var(--fs-h3);
    color: var(--accent-secondary);
    /* Amber role labels */
    margin-bottom: 0;
}

.timeline-company {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: var(--fs-small);
}

.timeline-list {
    margin-bottom: var(--space-3);
}

.timeline-list li {
    position: relative;
    padding-left: var(--space-4);
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

.timeline-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
    /* Amber markers */
    font-family: var(--font-mono);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.tag,
.tool,
.skill-tile {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.tag:hover,
.tool:hover,
.skill-tile:hover {
    background: rgba(110, 86, 207, 0.1);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* --- Grid Systems --- */
.projects-grid,
.skills-grid,
.cert-grid {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.35rem;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.project-tools {
    margin-top: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

/* --- Certifications Amazing UI Fixed --- */
.cert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-5);
    min-height: 320px;
    justify-content: flex-start;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.8) 0%, rgba(10, 10, 20, 0.9) 100%);
}

.cert-badge {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.cert-card:hover .cert-badge {
    transform: scale(1.05) translateY(-5px);
    border-color: var(--accent-primary);
    background: rgba(110, 86, 207, 0.08);
}

.cert-badge img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block;
}

.cert-placeholder-icon {
    width: 60px;
    height: 60px;
    color: var(--accent-primary);
    opacity: 0.8;
}

.cert-info {
    width: 100%;
}

.cert-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.cert-year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-secondary);
    background: rgba(233, 185, 110, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0;
}

.cert-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
    z-index: 1;
}

.cert-card:hover .cert-glow {
    opacity: 1;
}

.cert-card.is-in-progress {
    border-style: dashed;
    border-color: var(--text-muted);
}


/* --- Skills --- */
.skill-category {
    padding: var(--space-4);
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.category-header h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.skill-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* --- Contact Section Modernized --- */
.contact-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: var(--space-6);
}

.title-bar {
    width: 40px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.contact-main-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.contact-form-card {
    background: rgba(35, 35, 55, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: var(--space-5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition-smooth);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(110, 86, 207, 0.05);
    box-shadow: 0 0 15px rgba(110, 86, 207, 0.1);
}

.btn-send {
    margin-top: var(--space-2);
    width: 100%;
    justify-content: center;
    border-radius: 8px;
}

.connect-side {
    padding-left: 20px;
}

.connect-title {
    font-size: 1.8rem;
    margin-bottom: var(--space-3);
    text-align: center;
    color: var(--text-primary);
}

.connect-desc {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-6);
    line-height: 1.6;
    font-size: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.social-icons-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.social-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.icon-box {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    color: var(--accent-primary);
    border: none;
    transition: var(--transition-smooth);
}

.social-icon-item svg {
    width: 28px;
    height: 28px;
}

.social-icon-item:hover .icon-box {
    transform: translateY(-8px);
    color: var(--accent-primary);
    filter: drop-shadow(0 0 10px rgba(110, 86, 207, 0.4));
}

.social-icon-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.social-icon-item:hover span {
    color: var(--text-primary);
}

@media (max-width: 992px) {
    .contact-main-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .connect-side {
        padding-left: 0;
        order: -1;
    }
}


/* -------------------------------------------------------------------------- */
/* 7. ANIMATIONS DISCIPLINE                                                   */
/* -------------------------------------------------------------------------- */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-fade);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------------------------- */
/* 10. PROJECT DETAILS PAGE                                                   */
/* -------------------------------------------------------------------------- */

.project-details-page {
    padding-top: 120px;
    padding-bottom: var(--space-8);
}

.project-details-page .container {
    max-width: 1400px;
}

.project-details-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 1024px) {
    .project-details-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
}

/* Sidebar Navigation */
.project-sidebar {
    position: sticky;
    top: 120px;
    padding: var(--space-4);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
}

.sidebar-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
    font-family: var(--font-mono);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-left: 2px solid transparent;
    transition: var(--transition-smooth);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    background: rgba(110, 86, 207, 0.08);
}

/* Content Styles */
.project-header {
    margin-bottom: var(--space-7);
}

.project-meta {
    display: flex;
    gap: var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-3);
}

.project-article h2 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
    font-size: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.project-article p {
    margin-bottom: var(--space-4);
}

/* Terminal Code Blocks */
.code-block {
    background: #000;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin: var(--space-4) 0;
    overflow: hidden;
}

.code-header {
    background: #111;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background: #ef2929;
}

.dot-yellow {
    background: #fce94f;
}

.dot-green {
    background: #8ae234;
}

.code-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-content {
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    color: #e0e0e0;
}

.code-content code {
    white-space: pre;
}

/* Inline Code */
code:not(.code-content code) {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-blue);
}

.project-content-card {
    background: linear-gradient(to bottom right, #12050f, #050104);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: var(--space-6);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.slide-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--border);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
    display: block;
    background: #000;
    cursor: zoom-in;
    transition: var(--transition-smooth);
}

.slide-image:hover {
    transform: scale(1.01);
    border-color: var(--accent-purple);
}

.slide-note {
    padding: 0;
    margin-bottom: var(--space-4);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.slide-note ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    position: relative;
}

/* Vertical Timeline Line Removed - Clean UI */

.slide-note li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
}

.slide-note li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-black);
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 10px rgba(110, 86, 207, 0.3);
    z-index: 1;
}

.slide-note li:last-child {
    margin-bottom: 0;
}

.cyber-table .slide-note {
    margin-bottom: 0;
}

/* Feature Grid & Flowchart */
.feature-main-section h2 {
    font-size: var(--fs-h2);
    margin-bottom: var(--space-4);
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
    padding-bottom: 5px;
}

.sub-section-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: var(--space-6) 0 var(--space-3);
    font-weight: 600;
    opacity: 0.9;
}

.feature-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.cyber-table {
    background: var(--bg-black);
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    background: rgba(110, 86, 207, 0.15);
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
}

.table-header h3 {
    font-size: 0.9rem;
    color: var(--accent-secondary);
    /* Amber pops in headers */
    font-family: var(--font-mono);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.table-content {
    padding: 15px 20px;
}

.table-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row span:last-child {
    color: var(--accent-secondary);
    /* Amber for labels/values */
    font-weight: 500;
}

.table-content ul,
.table-content ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-footer {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 2px solid var(--border);
}

/* Data Table & Dash Note */
.cyber-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-4) 0;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    overflow: hidden;
}

.cyber-data-table th {
    background: rgba(110, 86, 207, 0.1);
    color: var(--accent-secondary);
    /* Amber headers for data tables */
    font-family: var(--font-mono);
    text-align: left;
    padding: 10px 15px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
}

.cyber-data-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.cyber-data-table tr:last-child td {
    border-bottom: none;
}

.cyber-data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cyber-data-table code {
    color: var(--accent-secondary) !important;
    background: transparent !important;
    padding: 0 !important;
}

.admin-dashboard-note {
    background: rgba(138, 226, 52, 0.05);
    border: 1px solid var(--accent-secondary);
    padding: 12px 20px;
    border-radius: 12px;
    margin-top: var(--space-5);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 15px rgba(138, 226, 52, 0.1);
}

.admin-dashboard-note strong {
    color: var(--accent-secondary);
    font-family: var(--font-heading);
    white-space: nowrap;
}

.admin-dashboard-note p {
    margin: 0;
    font-size: 0.9rem;
}

.metrics-banner {
    background: rgba(110, 86, 207, 0.08);
    border: 1px solid var(--border-bright);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.metrics-banner span:first-child {
    font-family: var(--font-heading);
    font-weight: 600;
}

.metrics-banner span:last-child {
    font-family: var(--font-mono);
    color: var(--accent-blue);
    font-weight: 700;
}

.cyber-table .slide-note li::before {
    top: 6px;
    width: 10px;
    height: 10px;
}

.cyber-table .slide-note li {
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .cyber-data-table {
        display: block;
        overflow-x: auto;
    }
}

.flowchart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: var(--space-6) 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed var(--border);
}

.flow-step {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--accent-primary);
    transition: var(--transition-smooth);
    flex: 1;
    min-width: 110px;
    box-shadow: 0 4px 15px rgba(110, 86, 207, 0.1);
}

.flow-step:hover {
    background: rgba(110, 86, 207, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 86, 207, 0.2);
}

.flow-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

@media (max-width: 900px) {
    .flowchart {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .flow-step {
        width: 100%;
    }
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(110, 86, 207, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.cyber-graphic {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(110, 86, 207, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 86, 207, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black, transparent 90%);
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.scanning-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0.5;
    box-shadow: 0 0 15px var(--accent-cyan);
    animation: scan 4s linear infinite;
    z-index: 5;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.nodes-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.node {
    box-shadow: 0 0 10px var(--accent-cyan);
}


/* -------------------------------------------------------------------------- */
/* 8. FOOTER                                                                  */
/* -------------------------------------------------------------------------- */

.main-footer {
    padding: var(--space-6) 0;
    border-top: 1px solid var(--border);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-small);
    color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/* 9. RESPONSIVE SYSTEM REFACTOR                                              */
/* -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    :root {
        --container-padding: 32px;
        --section-padding-v: 70px;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 24px;
        --section-padding-v: 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .hero-visual {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-5);
        transition: var(--transition-smooth);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .contact-card {
        padding: var(--space-5) var(--space-4);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 20px;
        --section-padding-v: 50px;
    }

    .projects-grid,
    .skills-grid,
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }
}

/* -------------------------------------------------------------------------- */
/* 11. ANALYSIS HUB (TIMELINE SELECTION)                                      */
/* -------------------------------------------------------------------------- */

.analysis-hub {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8) 0;
}

.hub-title {
    font-size: var(--fs-h1);
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.hub-header {
    margin-bottom: var(--space-7);
}

.hub-count {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    margin-left: 10px;
}

.analysis-timeline {
    position: relative;
    padding-left: 60px;
}

.analysis-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--border-bright), transparent);
}

.analysis-link {
    display: block;
    text-decoration: none;
    position: relative;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-4);
    transition: var(--transition-smooth);
}

.analysis-dot {
    position: absolute;
    left: -60px;
    top: 28px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-black);
    border: 4px solid var(--border-bright);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.analysis-link:hover .analysis-dot {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: 0 0 25px var(--accent-primary);
    transform: translateX(5px) scale(1.2);
}

.analysis-info {
    transition: var(--transition-smooth);
}

.analysis-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.analysis-title {
    font-size: 2.2rem;
    color: var(--text-muted);
    /* Better visibility than #444 */
    font-weight: 700;
    transition: all 0.3s ease;
}

.analysis-link:hover .analysis-title {
    color: var(--text-primary);
    transform: translateX(15px);
}

.analysis-link:hover .analysis-tag {
    color: var(--accent-secondary);
    /* Amber pop on hover */
}

@media (max-width: 768px) {
    .analysis-title {
        font-size: 1.6rem;
    }

    .analysis-timeline {
        padding-left: 40px;
    }

    .analysis-dot {
        left: -40px;
        width: 18px;
        height: 18px;
        top: 24px;
    }
}