:root {
    --primary-color: #4361ee;
    --secondary-color: #3bc9db;
    --dark-bg: #0d1117;
    --dark-surface: #161b22;
    --dark-text: #f0f6fc;
    --light-bg: #a0d0ff;
    --light-surface: #ffffff;
    --light-text: #000000;
    --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --section-padding: 80px 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    font-size: 16px;
    transition: var(--transition);
}

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

body:not(.dark-mode) {
    background-color: var(--light-bg);
    color: var(--light-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-dark);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
}

.dark-mode header {
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
}

body:not(.dark-mode) header {
    background-color: rgba(249, 250, 251, 0.9);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: inherit;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mode-toggle {
    cursor: pointer;
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin-bottom: 5px;
    position: relative;
    background-color: var(--dark-text);
    border-radius: 3px;
    z-index: 1;
    transform-origin: 4px 0px;
    transition: var(--transition);
}

body:not(.dark-mode) .hamburger span {
    background-color: var(--light-text);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cyber-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.9) 0%, rgba(74, 107, 255, 0.2) 100%);
    z-index: -1;
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
.about {
    padding: var(--section-padding);
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.avatar {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    transition: var(--transition);
    display: flex;
    justify-content: right;
    align-items: right;
    position: relative;
}

.avatar svg {
    width: 100%;
    height: 100%;
    display: none;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background-color: #f0f0f0;
}

.dark-mode .avatar svg circle {
    fill: #6b7280;
}

body:not(.dark-mode) .avatar svg circle {
    fill: #4b5563;
}

.about-text {
    flex: 2;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: inherit;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Experience Section */
.experience {
    padding: var(--section-padding);
}

.dark-mode .experience {
    background-color: var(--dark-surface);
}

body:not(.dark-mode) .experience {
    background-color: var(--light-surface);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

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

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

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    top: 20px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-content {
    padding: 20px;
    border-radius: var(--border-radius);
}

.dark-mode .timeline-content {
    background-color: rgba(30, 30, 30, 0.7);
    box-shadow: var(--shadow-dark);
}

body:not(.dark-mode) .timeline-content {
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-light);
}

.timeline-content h3 {
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-weight: 500;
    margin-bottom: 10px;
}

.dark-mode .timeline-content h4 {
    color: rgba(224, 224, 224, 0.8);
}

body:not(.dark-mode) .timeline-content h4 {
    color: rgba(51, 51, 51, 0.8);
}

/* Skills Section */
.skills {
    padding: var(--section-padding);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.skill-category {
    flex: 1;
    min-width: 300px;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-item {
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.dark-mode .skill-item {
    background-color: var(--dark-surface);
    box-shadow: var(--shadow-dark);
}

body:not(.dark-mode) .skill-item {
    background-color: var(--light-surface);
    box-shadow: var(--shadow-light);
}

.skill-item:hover {
    transform: translateY(-5px);
}

.dark-mode .skill-item:hover {
    background-color: var(--primary-color);
    color: white;
}

body:not(.dark-mode) .skill-item:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-light);
}

.skill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.dark-mode .skill-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

body:not(.dark-mode) .skill-icon {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.skill-item:hover .skill-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
}

.dark-mode .projects {
    background-color: var(--dark-surface);
}

body:not(.dark-mode) .projects {
    background-color: var(--light-surface);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dark-mode .project-card {
    background-color: var(--dark-bg);
    box-shadow: var(--shadow-dark);
}

body:not(.dark-mode) .project-card {
    background-color: var(--light-bg);
    box-shadow: var(--shadow-light);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dark-mode .project-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.dark-mode) .project-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.project-body {
    padding: 1.5rem;
    flex: 1;
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.dark-mode .project-tech span {
    background-color: rgba(74, 107, 255, 0.2);
}

body:not(.dark-mode) .project-tech span {
    background-color: rgba(74, 107, 255, 0.1);
}

.project-footer {
    padding: 1rem 1.5rem;
}

.dark-mode .project-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.dark-mode) .project-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Certifications Section */
.certifications {
    padding: var(--section-padding);
}

.cert-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.dark-mode .cert-item {
    background-color: var(--dark-surface);
    box-shadow: var(--shadow-dark);
}

body:not(.dark-mode) .cert-item {
    background-color: var(--light-surface);
    box-shadow: var(--shadow-light);
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cert-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.security-clearance .cert-icon {
    background-color: var(--secondary-color);
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
}

.dark-mode .contact {
    background-color: var(--dark-surface);
}

body:not(.dark-mode) .contact {
    background-color: var(--light-surface);
}

.contact-content {
    display: flex;
    gap: 3rem;
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.calendly {
    margin-top: 3rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.dark-mode .calendly {
    background-color: var(--dark-bg);
    box-shadow: var(--shadow-dark);
}

body:not(.dark-mode) .calendly {
    background-color: var(--light-bg);
    box-shadow: var(--shadow-light);
}

.calendly h3 {
    margin-bottom: 1rem;
}

.calendly p {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    background-color: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body:not(.dark-mode) .form-group input,
body:not(.dark-mode) .form-group textarea {
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Blog Section */
.blog {
    padding: var(--section-padding);
}

.dark-mode .blog {
    background-color: var(--dark-surface);
}

body:not(.dark-mode) .blog {
    background-color: var(--light-surface);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dark-mode .blog-card {
    background-color: var(--dark-bg);
    box-shadow: var(--shadow-dark);
}

body:not(.dark-mode) .blog-card {
    background-color: var(--light-bg);
    box-shadow: var(--shadow-light);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.blog-img {
    height: 180px;
    background-color: var(--primary-color);
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.blog-date {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    text-align: center;
    border-top-left-radius: var(--border-radius);
}

.blog-date span {
    display: block;
}

.blog-date span:first-child {
    font-size: 1.5rem;
    font-weight: bold;
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h3 {
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    align-self: flex-start;
}

.read-more i {
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
}

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

body:not(.dark-mode) footer {
    background-color: var(--light-bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 20px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline::after {
        left: 20px;
    }
    
    .timeline-dot {
        left: 11px;
        right: auto;
    }
    
    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        transform: translateX(-100%);
        z-index: 900;
    }
    
    .dark-mode .nav-links {
        background-color: rgba(18, 18, 18, 0.98);
    }
    
    body:not(.dark-mode) .nav-links {
        background-color: rgba(249, 250, 251, 0.98);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
}

.email-protected {
    unicode-bidi: bidi-override;
    direction: rtl;
}

/* Email hover animation - hacker style */
.email-link {
    position: relative;
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    overflow: hidden;
}

.email-link::before {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    left: -2px;
    color: var(--secondary-color);
    background-color: var(--dark-surface);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translateX(0);
    opacity: 0;
    transition: all 0.2s ease;
}

.dark-mode .email-link::before {
    background-color: var(--dark-surface);
}

body:not(.dark-mode) .email-link::before {
    background-color: var(--light-surface);
}

.email-link::after {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    left: 2px;
    color: var(--primary-color);
    background-color: var(--dark-surface);
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translateX(0);
    opacity: 0;
    transition: all 0.2s ease;
}

.dark-mode .email-link::after {
    background-color: var(--dark-surface);
}

body:not(.dark-mode) .email-link::after {
    background-color: var(--light-surface);
}

.email-link:hover::before {
    opacity: 1;
    transform: translateX(-1px);
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

.email-link:hover::after {
    opacity: 1;
    transform: translateX(1px);
    animation: glitch-anim 0.3s infinite linear alternate;
}

@keyframes glitch-anim {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
        transform: translate(-2px, -2px);
    }
    50% {
        clip-path: polygon(0 50%, 100% 50%, 100% 75%, 0 75%);
        transform: translate(2px, 2px);
    }
    100% {
        clip-path: polygon(0 70%, 100% 70%, 100% 100%, 0 100%);
        transform: translate(-2px, 2px);
    }
}

/* Add this to your styles.css file */
.codedText {
  padding: 5px 10px;
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--border-radius);
  font-family: 'Share Tech Mono', monospace;
  transition: var(--transition);
}

.codedText:hover {
  background: var(--secondary-color);
}

/* Import the Share Tech Mono font */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');
