:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1f1f1f;

    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;

    --accent-cyan: #00f3ff;
    --accent-green: #0aff48;
    --accent-yellow: #f8c514;
    /* New Yellow Accent */
    --accent-purple: #bc13fe;

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;

    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(10, 10, 10, 0.85);
    /* Dark transparent */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: -1px;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(0, 243, 255, 0.03) 0%, rgba(10, 10, 10, 0) 70%);
    padding: 40px 0;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}

.terminal-text {
    font-family: var(--font-mono);
    color: var(--accent-green);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.prompt {
    margin-right: 8px;
    animation: blink 1s infinite;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    margin-bottom: 20px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background-color: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.primary-btn:hover {
    background-color: #fff;
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
}

.secondary-btn {
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    background: transparent;
}

.secondary-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* General Section Styling */
.section {
    padding: 60px 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
    text-align: center;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-cyan);
    margin: 15px auto 0;
}

/* About Section */
.about-grid {
    display: flex;
    justify-content: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.skills-wrapper {
    margin-top: 40px;
    text-align: center;
}

.skills-wrapper h3 {
    margin-bottom: 25px;
    font-family: var(--font-mono);
    color: var(--accent-green);
    font-size: 1.2rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skills-list span {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.skills-list span i {
    color: var(--accent-cyan);
    margin-right: 8px;
}

/* Experience Grid */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Research Cards Highlight */
.research-card {
    border-left: 3px solid var(--accent-green);
}

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

.card-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
}

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

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.role {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collaborator {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-style: italic;
}

.collaborator i {
    color: var(--accent-purple);
    margin-right: 6px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

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

.tags span {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
}

/* Gallery / Physical Security */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    aspect-ratio: 4/3;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Remove placeholder styles */

/* CTF Table */
.ctf-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ctf-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.ctf-table th,
.ctf-table td {
    padding: 15px 25px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ctf-table th {
    background: rgba(0, 243, 255, 0.05);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.team-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.ctf-table td {
    color: var(--text-muted);
}

.ctf-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
}

.rank-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
}

.rank-top {
    color: var(--accent-green);
    background: rgba(10, 255, 72, 0.1);
    border: 1px solid rgba(10, 255, 72, 0.2);
}

.rank-top-10 {
    color: var(--accent-yellow);
    background: rgba(248, 197, 20, 0.1);
    border: 1px solid rgba(248, 197, 20, 0.2);
}

.ctf-hidden {
    display: none !important;
}

.ctf-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.report-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: 0.3s;
}

.report-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-5px);
}

.report-card h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.report-card .category {
    color: var(--accent-purple);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 8px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.close-modal:hover {
    color: var(--accent-cyan);
}

#modal-title {
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-family: var(--font-mono);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* Markdown Rendering in Modal */
#modal-body {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

#modal-body h1,
#modal-body h2,
#modal-body h3 {
    color: var(--text-main);
    margin: 20px 0 10px;
    font-weight: 600;
}

#modal-body h1 {
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

#modal-body ul,
#modal-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

#modal-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.85em;
}

#modal-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
}

#modal-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text-muted);
}

/* Education */
.education-grid {
    display: flex;
    justify-content: center;
}

.education-card {
    max-width: 800px;
    width: 100%;
}

.org-section {
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.org-section h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-family: var(--font-mono);
}

.org-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.org-list li {
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 15px;
    border-radius: 4px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.org-list li:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 243, 255, 0.05);
}

.org-list li i {
    color: var(--accent-cyan);
}

/* Alias Highlight */
.alias-highlight {
    color: var(--accent-cyan);
    font-weight: 500;
}

/* Contact */
.contact-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-link {
    font-size: 1.2rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-link:hover {
    color: var(--accent-cyan);
}

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Animations */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    /* Mobile Menu Open State */
    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }

    .nav-links.mobile-open a {
        font-size: 1.1rem;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .hero {
        min-height: auto;
        padding: 60px 20px;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .section {
        padding: 40px 0;
    }

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

    /* CTF Table - Convert to Card Layout on Mobile */
    .ctf-container {
        background: transparent;
        border: none;
        overflow: visible;
    }

    .ctf-table {
        min-width: unset;
    }

    .ctf-table thead {
        display: none;
    }

    .ctf-table tbody {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .ctf-table tr {
        display: flex;
        flex-direction: column;
        background: var(--bg-card);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 15px;
    }

    .ctf-table tr:hover {
        border-color: var(--accent-cyan);
    }

    .ctf-table td {
        border: none;
        padding: 5px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ctf-table td::before {
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 0.75rem;
        color: var(--accent-cyan);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-right: 10px;
    }

    .ctf-table td:first-child {
        font-weight: 600;
        color: var(--text-main);
        font-size: 1rem;
    }

    .ctf-table td:first-child::before {
        display: none;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Project Cards */
    .experience-grid {
        grid-template-columns: 1fr;
    }

    /* Reduce Card Padding */
    .card {
        padding: 20px;
    }

    /* Education Grid */
    .education-card {
        padding: 20px;
    }

    .org-list {
        grid-template-columns: 1fr;
    }

    /* Contact Links */
    .contact-wrapper {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    /* Reports Grid */
    .reports-grid {
        grid-template-columns: 1fr;
    }

    /* Profile Image */
    .profile-img {
        width: 150px;
        height: 150px;
    }
}

/* Profile Image Styling */
.profile-img-container {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    object-fit: cover;
}

.hidden {
    display: none !important;
}

.gallery-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}