/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0a192f;
    color: #e6f1ff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
header {
    background-color: rgba(10, 25, 47, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header:hover {
    background-color: rgba(10, 25, 47, 1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.9);
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 3rem;
    padding: 0;
    margin: 0;
}

nav a {
    color: #64ffda;
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.05rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #fff;
}

nav a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #64ffda;
    transition: width 0.3s ease, left 0.3s ease;
}

nav a:hover::before {
    width: 100%;
    left: 0;
}

nav a.active::before {
    width: 100%;
    left: 0;
}

nav a.active {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav a {
        font-size: 1rem;
    }
}


/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center; 
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #64ffda;
    position: relative;
    display: inline-block;
}

#hero h1 span {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.75;
    animation: glitch 1s infinite;
}

#hero h1 span:nth-child(1) {
    animation-delay: -0.2s;
    color: #ff6f61;
}

#hero h1 span:nth-child(3) {
    animation-delay: 0.2s;
    color: #6a5acd;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

#hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ccd6f6;
    animation: fadeIn 8s ease-in-out infinite;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    25% { opacity: 1;}
    50% { opacity: 0;}
    75% { opacity: 1;}
    100% { opacity: 0;}
}


.typing-text {
    font-size: 1.5rem;
    color: #64ffda;
    margin-top: 1rem;
    min-height: 2rem;  
    line-height: 1.5rem;  
    display: inline-block; 
    vertical-align: middle;  
    white-space: nowrap;  
}

.txt {
    border-right: 0.2rem solid #64ffda;
    padding-right: 0.5rem;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% { border-right-color: transparent }
    50% { border-right-color: #64ffda }
    100% { border-right-color: transparent }
}


/* Particles */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Sections */
section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #64ffda;
    text-align: center;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background-color: #112240;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.skill-card:hover {
    border-color: #64ffda;
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-header i {
    font-size: 1.5rem;
    color: #64ffda;
}

.skill-card h3 {
    color: #64ffda;
    margin: 0;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    margin-bottom: 0.8rem;
    color: #a8b2d1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-card li i {
    color: #64ffda;
    width: 20px;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: #112240;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    color: #64ffda;
    margin-bottom: 1rem;
}

.project-card p {
    color: #a8b2d1;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 2rem;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-intro h3 {
    color: #64ffda;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.about-intro h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #64ffda, transparent);
}

.about-intro p {
    color: #a8b2d1;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-highlights {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.highlight-number {
    font-size: 2rem;
    font-weight: bold;
    color: #64ffda;
    margin-bottom: 0.5rem;
}

.highlight-text {
    color: #a8b2d1;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.terminal-window {
    background: #0d1117;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-window:hover {
    border-color: #64ffda;
    box-shadow: 0 15px 40px rgba(100, 255, 218, 0.2);
}

.terminal-header {
    background: #161b22;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn.red { background: #ff5f56; }
.btn.yellow { background: #ffbd2e; }
.btn.green { background: #27ca3f; }

.terminal-title {
    color: #64ffda;
    font-size: 0.9rem;
    font-weight: 500;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.prompt {
    color: #64ffda;
    margin-right: 0.5rem;
}

.output {
    color: #a8b2d1;
}

.cursor {
    color: #64ffda;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Mobile Responsive for About Section */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-highlights {
        flex-direction: column;
        gap: 1rem;
    }
    
    .highlight-number {
        font-size: 1.5rem;
    }
    
    .terminal-window {
        max-width: 100%;
    }
    
    .terminal-body {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* CTF Dashboard */
.ctf-dashboard {
    margin-top: 2rem;
}

.dashboard-header {
    margin-bottom: 3rem;
}

.dashboard-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #112240, #0a192f);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    min-width: 150px;
}

.stat-box:hover {
    border: 1px solid transparent;
    border-color: #64ffda;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(100, 255, 218, 0.2);
}

.stat-icon {
    font-size: 2rem;
    color: #64ffda;
}

.stat-info {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #e6f1ff;
    line-height: 1;
}

.stat-label {
    color: #a8b2d1;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-top: 0.2rem;
}

.ctf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ctf-card {
    background: linear-gradient(135deg, #112240, #0a192f);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ctf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.05), transparent);
    transition: left 0.5s ease;
}

.ctf-card:hover::before {
    left: 100%;
}

.ctf-card:hover {
    border-color: #64ffda;
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(100, 255, 218, 0.2);
}

.ctf-card.featured {
    border-color: #64ffda;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

.ctf-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #64ffda;
    color: #0a192f;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.ctf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.ctf-icon {
    background: rgba(100, 255, 218, 0.1);
    padding: 1rem;
    border-radius: 10px;
    color: #64ffda;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.ctf-info {
    flex: 1;
}

.ctf-info h3 {
    color: #64ffda;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.ctf-date {
    color: #a8b2d1;
    font-size: 0.9rem;
    margin: 0;
}

.ctf-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    min-width: 60px;
    text-align: center;
}

.ctf-rank.first {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #0a192f;
}

.ctf-rank.second {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #0a192f;
}

.ctf-rank.gold {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
}

.ctf-rank.top {
    background: linear-gradient(135deg, #64ffda, #4ecdc4);
    color: #0a192f;
}

.ctf-rank:not(.first):not(.second):not(.gold):not(.top) {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.ctf-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.category {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease;
}

.category:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: #64ffda;
}

/* Mobile Responsive for CTF Section */
@media (max-width: 768px) {
    .dashboard-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .stat-box {
        min-width: 200px;
        justify-content: center;
    }

    .ctf-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ctf-card {
        padding: 1.5rem;
    }

    .ctf-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ctf-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .ctf-rank {
        align-self: flex-start;
    }

    .ctf-badge {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.9rem;
        padding: 0.2rem 0.6rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .terminal-body {
        font-size: 0.8rem;
        padding: 1rem;
    }
}

/* Contact Section */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 2px solid #64ffda;
    color: #64ffda;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.contact-button:hover {
    animation: pulse 1s infinite;
    background-color: rgba(100, 255, 218, 0.1);
}

.contact-button i {
    font-size: 1.5rem;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Footer */
footer {
    text-align: center;
    padding: 0.5rem 0;
    background-color: #112240;
    color: #a8b2d1;
    position: relative;
    z-index: 2;
}

.binary-footer {
    height: 1px;
    background: linear-gradient(90deg, transparent, #64ffda, transparent);
    margin-top: 0.3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Hero Section Mobile */
    #hero {
        padding: 80px 20px 40px;
        min-height: 100vh;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    #hero h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    #hero h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .typing-text {
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }

    /* Profile Photo Mobile */
    .profile-photo {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    /* Navigation Mobile */
    header {
        padding: 0.5rem 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    nav a {
        font-size: 1rem;
    }

    /* Sections Mobile */
    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    /* Skills Grid Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    /* Projects Grid Mobile */
    .skills-grid,
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    /* About Section Mobile */
    .about-card {
        padding: 1.5rem;
        text-align: center;
    }

    /* Contact Links Mobile */
    .contact-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: center;
    }

    .contact-button {
        width: 45px;
        height: 45px;
    }

    .contact-button i {
        font-size: 1.2rem;
    }

    /* Footer Mobile */
    footer {
        padding: 1rem 0;
        text-align: center;
    }

    footer p {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    #hero {
        padding: 70px 15px 30px;
    }

    #hero h1 {
        font-size: 1.8rem;
    }

    .typing-text {
        font-size: 1rem;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    h2 {
        font-size: 1.8rem;
    }

    .skill-card,
    .project-card {
        padding: 1rem;
    }

    .contact-links {
        gap: 1rem;
    }

    .contact-button {
        width: 40px;
        height: 40px;
    }

    .contact-button i {
        font-size: 1rem;
    }
}


/* Profile Photo */
.profile-photo {
    flex-shrink: 0;
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.5);
}

.profile-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(45deg, transparent, rgba(100, 255, 218, 0.1));
    z-index: 1;
}

.profile-photo img.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
