:root {
    --primary-color: #0a192f;
    --secondary-color: #64ffda;
    --dark-color: #020c1b;
    --light-color: #ccd6f6;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--light-color);
    background-color: var(--primary-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

/* Navbar */
#navbar {
    background: transparent;
    color: #fff;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

#navbar ul {
    display: flex;
    list-style: none;
}

#navbar ul li a {
    color: #fff;
    padding: 0.75rem;
    margin: 0 0.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

#navbar ul li a:hover {
    color: var(--secondary-color);
}

/* Header */
#home {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/random/1600x900/?cybersecurity') no-repeat center center/cover;
    height: 100vh;
    color: #fff;
    display: flex;
    align-items: center;
    text-align: center;
}

#home .container {
    padding: 0 2rem;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
    margin-bottom: 2rem;
    object-fit: cover;
}

#home h1, #home h2, #home p {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#home h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#home h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#home p {
    font-size: 1.5rem;
    max-width: 600px;
    margin: auto;
}

/* Sections */
section {
    padding: 5rem 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.bg-dark {
    background-color: var(--dark-color);
}

/* Skills */
.skills {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.skill {
    text-align: center;
}

.skill-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

/* Projects */
.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.project-badge {
    background: var(--dark-color);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 200px;
    overflow: hidden;
}

.project-badge.active {
    width: 100%;
}

.project-badge h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.project-details {
    display: none;
}

.project-badge.active .project-details {
    display: block;
}

.project-details h4 {
    color: var(--secondary-color);
    margin-top: 1rem;
}

.project-details p {
    margin-bottom: 1rem;
}

/* Contact */
.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.social-icons a {
    color: var(--light-color);
    font-size: 1.2rem;
    margin: 0 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--dark-color);
    padding: 1rem 0;
    text-align: center;
}

/* Responsive Design */
@media(max-width: 768px) {
    #navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    #navbar ul {
        margin-top: 1rem;
    }

    #home h1 {
        font-size: 3rem;
    }

    #home h2 {
        font-size: 1.5rem;
    }

    #home p {
        font-size: 1rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }
}

.writeups-button {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--dark-color);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--light-color);
    color: var(--dark-color);
}

#writeups {
    padding: 5rem 0;
}

.writeups-list {
    list-style-type: none;
    padding: 0;
}

.writeups-list li {
    margin-bottom: 1rem;
}

.writeups-list a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.writeups-list a:hover {
    color: var(--light-color);
}

.content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.toc {
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    background: var(--dark-color);
    padding: 1rem;
    border-radius: 5px;
    max-width: 250px;
}

.toc h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.toc ul {
    list-style-type: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc a:hover {
    color: var(--secondary-color);
}

.main-content {
    flex: 1;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

.code-snippet {
    background: var(--dark-color);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-family: monospace;
    color: var(--light-color);
}

.event-id-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 1rem;
}

.event-id-card {
    background-color: var(--secondary-color);
    border-radius: 5px;
    perspective: 1000px;
}

.event-id-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.event-id-card:hover .event-id-card-inner {
    transform: rotateY(180deg);
}

.event-id-card-front, .event-id-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.event-id-card-front {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    font-weight: bold;
}

.event-id-card-back {
    background-color: var(--dark-color);
    color: var(--light-color);
    transform: rotateY(180deg);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .event-id-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .event-id-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .event-id-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .event-id-container {
        grid-template-columns: 1fr;
    }
}

/* General improvements */
body {
    line-height: 1.6;
    color: var(--light-color);
    background-color: var(--primary-color);
}

h1, h2, h3, h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--light-color);
}

/* Ensure content doesn't overlap with the fixed navbar */
body {
    padding-top: 60px; /* Adjust this value based on your navbar height */
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-color);
    padding: 1rem;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

#sysmon-event-ids .event-id-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 20px;
}

#sysmon-event-ids .event-id-card {
    background-color: transparent;
    width: 100%;
    height: 150px;
    perspective: 1000px;
}

#sysmon-event-ids .event-id-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

#sysmon-event-ids .event-id-card:hover .event-id-card-inner {
    transform: rotateY(180deg);
}

#sysmon-event-ids .event-id-card-front,
#sysmon-event-ids .event-id-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
}

#sysmon-event-ids .event-id-card-front {
    background-color: #64ffda;
    color: #020c1b;
}

#sysmon-event-ids .event-id-card-back {
    background-color: #ccd6f6;
    color: #0a192f;
    transform: rotateY(180deg);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #sysmon-event-ids .event-id-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    #sysmon-event-ids .event-id-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #sysmon-event-ids .event-id-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #sysmon-event-ids .event-id-container {
        grid-template-columns: 1fr;
    }
}

#timeline {
    padding: 60px 0;
    background-color: #f0f0f0;
    position: relative;
}

.timeline {
    position: relative;
    padding: 20px 0;
    list-style: none;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #007bff;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    margin: 20px 0;
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-icon {
    background: #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    position: absolute;
    left: 50%;
    top: 15px;
    margin-left: -11px;
    z-index: 1;
}

.timeline-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.timeline-item:nth-child(odd) .timeline-content:before {
    content: "";
    position: absolute;
    top: 20px;
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.timeline-item:nth-child(even) .timeline-content:before {
    content: "";
    position: absolute;
    top: 20px;
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
}

.timeline h3 {
    margin-top: 0;
    color: #007bff;
}

.timeline p {
    margin: 0;
    color: #333333;
}
