:root {
    --bg-dark: #050505;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --primary: #00ffcc;
    --secondary: #8a2be2;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden; /* safe fallback */
}

/* Background Effects */
.bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: drift 20s infinite alternate linear;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    top: 40%;
    right: -200px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #ff00ff;
    bottom: -50px;
    left: 20%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* Typography & Utils */
.highlight {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 800;
}

.section-padding {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-sm {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary-sm {
    padding: 8px 20px;
    background: rgba(0, 255, 204, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-primary-sm:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.6);
}

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

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
}

.nav-links a:hover:not(.btn-primary-sm) {
    color: var(--primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.name {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 5px;
}

.nickname {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.typewriter .role {
    font-size: 1.2rem;
    color: var(--text-muted);
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 25px;
    animation: typing 3s steps(40, end), blink-caret .75s step-end infinite;
    display: inline-block;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary); }
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.image-wrapper {
    width: 350px;
    height: 350px;
    position: relative;
    z-index: 1;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 20px;
    z-index: -1;
    transition: var(--transition);
}

.image-wrapper:hover::before {
    top: 10px;
    left: -10px;
    border-color: var(--secondary);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    background-color: var(--bg-dark);
    filter: grayscale(100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.image-wrapper:hover img {
    transform: translateY(-5px);
    filter: grayscale(0%);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* About Section */
.about-container {
    display: flex;
    padding: 40px;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 2;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #dfdfdf;
}

.about-text strong {
    color: var(--primary);
}

.about-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--card-border);
}

.stat-box h3 {
    font-size: 3rem;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 5px;
}

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

.skill-card {
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 204, 0.3);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.1);
}

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

.skill-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Works Section */
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.work-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    height: 100%;
}

.work-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.15);
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.work-header .fa-folder-open {
    color: var(--primary);
    font-size: 2rem;
}

.work-header .fa-github {
    color: var(--text-muted);
    transition: var(--transition);
}

.work-card:hover .work-header .fa-github {
    color: var(--text-main);
}

.work-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.work-card:hover h3 {
    color: var(--primary);
}

.work-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 25px;
}

.work-footer {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.language {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.lang-dot.ts { background-color: #3178c6; }
.lang-dot.js { background-color: #f1e05a; }
.lang-dot.css { background-color: #563d7c; }

/* TryHackMe Section */
.thm-container {
    display: flex;
    gap: 40px;
}

.thm-badges, .thm-rooms {
    flex: 1;
}

.thm-heading {
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.thm-heading i {
    color: var(--primary);
    font-size: 1.8rem;
}

.thm-badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    height: 100%;
}

.thm-single-badge {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.thm-single-badge i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.thm-single-badge h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.thm-single-badge p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rooms-list {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.thm-room-items {
    list-style: none;
    flex-grow: 1;
}

.thm-room-items li {
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.thm-room-items li:last-child {
    border-bottom: none;
}

.thm-room-items li i {
    color: #a2ea2a; /* TryHackMe Green */
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Contact Section */
.contact-desc {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    min-width: 250px;
    text-decoration: none;
    transition: var(--transition);
}

.contact-card.interactive:hover {
    transform: translateY(-10px);
}

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

.contact-card p {
    color: var(--text-muted);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 10px;
}

.call-icon {
    background: rgba(138, 43, 226, 0.1);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.contact-card:hover .call-icon {
    background: var(--secondary);
    color: white;
}

.wa-icon {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border: 1px solid #25D366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.3);
}

.contact-card:hover .wa-icon {
    background: #25D366;
    color: white;
}

.gh-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.contact-card:hover .gh-icon {
    background: #fff;
    color: var(--bg-dark);
}

.li-icon {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
    border: 1px solid #0077b5;
    box-shadow: 0 0 15px rgba(0, 119, 181, 0.3);
}

.contact-card:hover .li-icon {
    background: #0077b5;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
}

/* Animations & Media Queries */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
        gap: 50px;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .nav-links {
        display: none;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .thm-container {
        flex-direction: column;
    }

    .section-padding {
        padding: 60px 5%;
    }
}
