:root {
    --bg-primary: #202225;
    --bg-secondary: #2f3136;
    --bg-tertiary: #36393f;
    --text-primary: #ffffff;
    --text-secondary: #b9bbbe;
    --accent-primary: #ffffff;
    --accent-secondary: #dcddde;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Particles Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 34, 37, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

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

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link:hover::after {
    width: 100%;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    position: relative;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 5s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    animation: glitch-1 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    color: var(--accent-secondary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    color: #ff0080;
    z-index: -2;
}

@keyframes glitch {
    0%, 90%, 100% {
        opacity: 1;
    }
    91%, 94% {
        opacity: 0.8;
    }
}

@keyframes glitch-1 {
    0% {
        clip-path: inset(40% 0 61% 0);
        transform: translate(-2px, 2px);
        opacity: 0.7;
    }
    100% {
        clip-path: inset(50% 0 51% 0);
        transform: translate(0);
        opacity: 0;
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: inset(60% 0 20% 0);
        transform: translate(2px, -2px);
        opacity: 0.7;
    }
    100% {
        clip-path: inset(50% 0 51% 0);
        transform: translate(0);
        opacity: 0;
    }
}

/* Typing Effect */
.typing-container {
    display: inline-block;
    margin-bottom: 30px;
}

.typing-text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-secondary);
    font-weight: 300;
    display: inline;
}

.cursor {
    display: inline-block;
    color: var(--accent-primary);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    padding: 15px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid var(--accent-primary);
    cursor: pointer;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-glow);
    transform: translateY(-3px);
}

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

.btn-outline:hover {
    background: var(--accent-glow);
    transform: translateY(-3px);
}

.btn-large {
    padding: 20px 50px;
    font-size: 1.1rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    color: var(--accent-primary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding: 8px;
}

.scroll-indicator span {
    width: 6px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 3px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 0; }
    40% { opacity: 1; }
    80% { transform: translateY(20px); opacity: 0; }
    100% { opacity: 0; }
}

/* Section Title */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 60px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-number {
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-tertiary);
    max-width: 300px;
}

/* About Section */
.about {
    padding: 100px 20px;
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: center;
}

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

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    list-style: none;
    margin-top: 20px;
}

.tech-list li {
    position: relative;
    padding-left: 25px;
    color: var(--text-secondary);
}

.tech-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.about-image {
    position: relative;
}

.img-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--accent-primary);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    mix-blend-mode: multiply;
    opacity: 0.3;
    transition: var(--transition);
    z-index: 1;
}

.img-wrapper:hover .img-overlay {
    opacity: 0;
}

.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    font-size: 120px;
}

/* Skills Section */
.skills {
    padding: 100px 20px;
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-primary);
    padding: 40px 30px;
    border-radius: 10px;
    border: 1px solid var(--bg-tertiary);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    background: #18191c;
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.skill-icon {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--white);
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.skill-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* Projects Section */
.projects {
    padding: 100px 20px;
}

.projects-grid {
    display: grid;
    gap: 50px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    position: relative;
}

.project-card:nth-child(even) {
    direction: rtl;
}

.project-card:nth-child(even) > * {
    direction: ltr;
}

.project-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 16/9;
    border: 2px solid var(--bg-tertiary);
    transition: var(--transition);
}

.project-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.2;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: var(--transition);
}

.project-image:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.project-link:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.project-content {
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--bg-tertiary);
    transition: var(--transition);
}

.project-content:hover {
    background: #1e1f22;
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

.project-featured {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.project-content h3 {
    font-size: 1.8rem;
    margin: 15px 0;
    color: var(--white);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
}

.project-tech li {
    color: var(--accent-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.more-projects {
    text-align: center;
    margin-top: 60px;
}

/* Contact Section */
.contact {
    padding: 100px 20px;
    background: var(--bg-secondary);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Footer */
.footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--bg-tertiary);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.heart {
    color: #ff0080;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
}

.code {
    color: var(--accent-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* CTF Rankings Section */
.ctf-rankings {
    max-width: 800px;
    margin: 0 auto;
}

.ctf-rank {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    margin-bottom: 15px;
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 10px;
    transition: var(--transition);
    flex-wrap: wrap;
    gap: 15px;
}

.ctf-rank:hover {
    background: #18191c;
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.rank-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    min-width: 60px;
    font-family: 'Courier New', monospace;
}

.rank-team {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    min-width: 150px;
}

.rank-event {
    color: var(--text-primary);
    flex: 1;
    text-align: right;
}

@media (max-width: 768px) {
    .ctf-rank {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .rank-event {
        text-align: left;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 40px 0;
        border-top: 1px solid var(--bg-tertiary);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-card:nth-child(even) {
        direction: ltr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

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

    .typing-text {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}
