:root {
    --primary: #2d5bff;
    --secondary: #6c42f5;
    --accent: #00c2ff;
    --dark: #1a1a2e;
    --light: #f5f5f7;
    --gray: #6c757d;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --accent-rgb: 0, 194, 255;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", sans-serif;
    color: var(--light);
    background: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Standardize heading fonts */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Poppins", sans-serif;
}

p {
    font-family: "Roboto", sans-serif;
}

/* Floating Background */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
}

.icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.07);
    font-size: 24px;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-family: "Poppins", sans-serif;
}

.logo span {
    color: var(--accent);
}

.logo i {
    margin-right: 10px;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* Enhanced Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    transform: scale(1.05);
}

.hamburger.active {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent);
}

.bar {
    display: block;
    width: 25px;
    height: 2.5px;
    margin: 3px 0;
    background: var(--light);
    transition: var(--transition);
    border-radius: 2px;
    transform-origin: center;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--accent);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--accent);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0 40px;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
}

.hero-subtitle {
    color: var(--accent);
    font-family: "Roboto Mono", monospace;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 15px 0;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
    font-family: "Quadrant", serif;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 30px;
    margin: 5px;
    text-decoration: none;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn i {
    margin-left: 8px;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--accent);
    }
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-family: "Quadrant", serif;
}

.section-title h2::after {
    content: "";
    display: block;
    margin: 10px auto;
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.section-content {
    max-width: 1000px;
    margin: auto;
    text-align: center;
}

/* About */
.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    justify-content: center;
}

.about-text {
    flex: 1;
    min-width: 280px;
}

.about-img {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.about-img img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
    text-align: left;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent);
}

/* Animated Skill Bars */
.skill-level-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.skill-level-bar {
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skill-level-bar.animate {
    width: var(--skill-level);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.skill-info span {
    font-size: 0.9em;
    color: var(--gray);
}

/* Skill percentage initial state */
.skill-percent {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-percent.visible {
    opacity: 1;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    margin: 10px 0;
    font-family: "Poppins", sans-serif;
}

/* Project links styling */
.project-links {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-link:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 91, 255, 0.3);
    color: white;
    border-color: transparent;
}

.project-link i {
    font-size: 0.9rem;
}

/* Project card enhancements */
.project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-description {
    flex-grow: 1;
    margin-bottom: 15px;
}

.project-img {
    text-align: center;
    margin-bottom: 15px;
}

.project-img i {
    font-size: 2.5rem;
    color: var(--accent);
}

/* Certificates */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.certificates-grid.hidden {
    display: none;
}

.certificates-grid:not(.hidden) {
    display: grid;
}

.cert-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
    cursor: pointer;
}

.cert-card:hover {
    transform: translateY(-5px);
}

.cert-card h3 {
    margin-bottom: 5px;
    font-family: "Poppins", sans-serif;
}

/* Class to center the button */
.center-btn-container {
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

#certModal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: modal-zoom 0.6s;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

@keyframes modal-zoom {
    from {
        transform: scale(0.1);
    }

    to {
        transform: scale(1);
    }
}

/* Contact Section */
.contact-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--light);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.1);
}

/* Remove the floating labels */
.form-group label {
    display: none;
}

/* Ensure placeholders are visible */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.form-message.error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.contact-info {
    margin: 30px 0;
    text-align: center;
}

.contact-info p {
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.contact-info i {
    color: var(--accent);
    width: 20px;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-info a:visited,
.contact-info a:active,
.contact-info a:focus {
    text-decoration: none;
    color: var(--accent);
}

.contact-info a:hover {
    color: #00c2ff;
    text-decoration: none;
}

/* Updated Button Styles */
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 30px;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-contact:hover {
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(43, 75, 201, 0.3);
}

.btn-contact:active,
.btn-contact:visited {
    text-decoration: none;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    background: #111;
}

/* Footer Social Links */
.footer-social {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-social a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        flex-direction: column;
        background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(42, 42, 72, 0.98) 100%);
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(15px);
        padding: 20px;
        z-index: 999;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 20px 0;
        opacity: 0;
        transform: translateX(-50px);
        transition: all 0.4s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }
    .nav-menu.active .nav-item:nth-child(2) {
        transition-delay: 0.2s;
    }
    .nav-menu.active .nav-item:nth-child(3) {
        transition-delay: 0.3s;
    }
    .nav-menu.active .nav-item:nth-child(4) {
        transition-delay: 0.4s;
    }
    .nav-menu.active .nav-item:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-link {
        font-size: 1.5rem;
        padding: 15px 30px;
        display: block;
        text-align: center;
        border-radius: 30px;
        transition: var(--transition);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link:hover {
        background: linear-gradient(45deg, var(--primary), var(--secondary));
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(45, 91, 255, 0.3);
        border-color: transparent;
    }

    .nav-link::after {
        display: none;
    }

    .contact-info p {
        flex-direction: column;
        gap: 5px;
    }

    .contact-form-container {
        padding: 20px;
        margin: 20px auto;
    }

    .contact-form {
        gap: 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .form-group label {
        font-size: 14px;
        top: 12px;
    }

    .form-group input:focus ~ label,
    .form-group input:valid ~ label,
    .form-group textarea:focus ~ label,
    .form-group textarea:valid ~ label {
        top: -8px;
        font-size: 11px;
    }

    .project-links {
        flex-direction: column;
        align-items: center;
    }

    .project-link {
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 12px 25px;
    }

    .hamburger {
        width: 45px;
        height: 45px;
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        font-size: 14px;
    }
}
