/* ==========================================================================
   CSS Variables & Global Reset
   ========================================================================== */
:root {
    --bg-main: #06070a;
    --red-primary: #ff1e42;
    --red-glow: rgba(255, 30, 66, 0.25);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --glass-bg: rgba(12, 14, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Desktop Fine Pointer Custom Cursor */
@media (pointer: fine) {
    * {
        cursor: none !important;
    }
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 30, 66, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.3) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Custom Cursor & Canvas
   ========================================================================== */
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--red-primary);
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
    opacity: 0;
}

body.cursor-hover .cursor-outline {
    width: 32px;
    height: 32px;
    background-color: var(--red-glow);
    border-color: #ffffff;
}

#flare-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

@media (pointer: coarse) {
    .cursor-outline, #flare-canvas {
        display: none !important;
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.accent-dot {
    color: var(--red-primary);
}

.glass-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.glass-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.glass-nav a:hover {
    color: var(--red-primary);
}

/* ==========================================================================
   Main Layout & Section Clearance
   ========================================================================== */
.container {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    padding: 140px 0 60px;
}

section {
    margin-bottom: 100px;
    scroll-margin-top: 140px !important; 
}

@media (max-width: 768px) {
    section {
        scroll-margin-top: 180px !important;
    }
}

/* Section Title & Underline Alignment Fix */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 35px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    line-height: 1.2;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--red-primary);
    border-radius: 2px;
}

/* ==========================================================================
   Glassmorphism Components
   ========================================================================== */
.glass-card, .clean-card {
    background: rgba(18, 22, 31, 0.45); /* More transparent */
    border: 1px solid rgba(255, 255, 255, 0.06); /* Very subtle border */
    border-radius: 10px;
    padding: 28px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 30, 66, 0.15);
    border-color: rgba(255, 30, 66, 0.4);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-text-full {
    margin-bottom: 40px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 30, 66, 0.1);
    color: var(--red-primary);
    border: 1px solid var(--red-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gradient-text {
    font-size: 4rem;
    line-height: 1.1;
    background: linear-gradient(to right, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.meta-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    margin-bottom: 24px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.03); /* Soft dark fill */
    border: 1px solid rgba(255, 255, 255, 0.08); /* Clean, subtle border instead of red */
    color: #cbd5e1; /* Slate text */
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    font-family: 'Fira Code', monospace;
}

.meta-item span {
    color: #e11d48; /* Professional crimson red for the labels */
    font-weight: 600;
    margin-right: 6px;
}

.hero-grid-sub {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}

.main-card h2 {
    margin-bottom: 15px;
}

.side-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Fira Code', monospace;
}

.terminal-status {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 600;
}

.status-title {
    color: var(--red-primary);
}

.status-active {
    color: var(--red-primary);
    margin-left: 6px;
}

.terminal-body p {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.terminal-body strong {
    color: var(--text-muted);
}

.terminal-list {
    list-style: none;
    margin-top: 10px;
}

.terminal-list li, .output.green {
    color: #10b981; /* Emerald green - much easier on the eyes */
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* ==========================================================================
   Education & Certifications
   ========================================================================== */
.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.edu-uni {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.edu-status {
    background: var(--red-primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cert-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.cert-img-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
}

.cert-proof-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.cert-card:hover .cert-proof-img {
    transform: scale(1.03);
}

.cert-details {
    padding: 20px;
}

.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.cert-header h3 {
    font-size: 1.1rem;
}

.cert-status.verified {
    color: #00ff66;
    border: 1px solid #00ff66;
    padding: 2px 6px;
    font-size: 0.6rem;
    border-radius: 3px;
}

.cert-issuer {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--red-primary);
    margin-bottom: 10px;
}

.cert-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.proof-link {
    font-size: 0.85rem;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--red-primary);
    text-underline-offset: 4px;
}

/* ==========================================================================
   Dedicated Security Lab Trackers Section
   ========================================================================== */
.trackers-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.tracker-main-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 30, 66, 0.2);
    position: relative;
    overflow: hidden;
}

.tracker-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), transparent);
}

.tracker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.platform-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-icon {
    font-family: 'Fira Code', monospace;
    color: var(--red-primary);
    font-weight: 800;
}

.status-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.status-badge.pulse-red {
    border-color: var(--red-primary);
    color: var(--red-primary);
}

.tracker-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    padding: 15px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-value.text-small {
    font-size: 0.85rem;
    color: var(--red-primary);
}

.tracker-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

.tracker-btn {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--red-primary);
    transition: color 0.3s;
}

.tracker-btn:hover {
    color: #ffffff;
}

.status-ok {
    color: #00ff66;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
}

/* ==========================================================================
   Labs & Projects
   ========================================================================== */
.labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.lab-card h3 {
    color: var(--red-primary);
    margin-bottom: 10px;
    font-family: 'Fira Code', monospace;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-centered {
    grid-column: span 2;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

.skills-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill-group h4 {
    margin-bottom: 15px;
    color: var(--red-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.skill-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--red-primary);
    font-family: 'Fira Code', monospace;
}

/* ==========================================================================
   Contact Form & Socials
   ========================================================================== */
.contact-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.social-btn:hover {
    background: var(--red-primary);
    border-color: var(--red-primary);
    color: #fff;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2rem;
    text-align: left;
}

#contact-form label {
    color: var(--red-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#contact-form input,
#contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--red-primary);
    background: rgba(255, 255, 255, 0.08);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

.glow-btn {
    background: var(--red-primary);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 6px;
    margin-top: 10px;
    transition: box-shadow 0.3s;
}

.glow-btn:hover {
    box-shadow: 0 0 15px var(--red-primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
    .certs-grid {
        grid-template-columns: 1fr;
    }
    .contact-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .glass-nav {
        flex-direction: column;
        padding: 12px 5%;
    }

    .glass-nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 14px;
    }

    .glass-nav a {
        font-size: 0.82rem;
    }

    .container {
        padding-top: 180px;
        width: 92%;
    }

    .gradient-text {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-grid-sub {
        grid-template-columns: 1fr;
    }

    .tracker-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
    }

    .project-centered {
        grid-column: span 1 !important;
        max-width: 100%;
    }

    .edu-header {
        flex-direction: column;
        gap: 8px;
    }
}