/* ========== Base & Variables ========== */
:root {
    --primary: #0ea5e9;
    --secondary: #7e22ce;
    --dark: #0f172a;
    --darker: #020617;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --panel: #1e293b;
    --panel-border: #334155;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text);
}

/* Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-hover {
    transition: all .3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, .2);
}

.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2rem;
    margin: 0 0 .5rem;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 2px;
}

.h3 {
    font-size: 1.5rem;
    margin: 0 0 1.25rem;
}

.center {
    text-align: center;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(2, 6, 23, .8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 700;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

.menu a {
    color: var(--text);
    text-decoration: none;
    margin: 0 1rem;
    position: relative;
    display: inline-block;
    padding: .25rem 0;
}

.menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width .3s ease;
}

.menu a:hover::after,
.menu a.active::after {
    width: 100%;
}

/* Responsive menu */
@media (max-width: 767px) {
    .desktop-menu {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .mobile-menu {
        padding: 0 1.5rem 1rem;
    }

    .mobile-menu:not(.hidden) {
        display: block;
    }
}

@media (min-width: 768px) {
    .desktop-menu {
        display: flex;
        align-items: center;
    }

    .mobile-menu {
        display: none !important;
    }
}

/* ========== Hero ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6.5rem;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text {
    flex: 1;
    min-width: 280px;
    max-width: 560px;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin: .25rem 0;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: #cbd5e1;
    margin: .5rem 0 1rem;
}

.hero-text p {
    color: var(--muted);
    margin: 0 0 1.25rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.btn {
    padding: .85rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    transition: all .25s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(14, 165, 233, .3);
}

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

.btn-outline:hover {
    background: rgba(14, 165, 233, .08);
}

.btn.full {
    width: 100%;
    justify-content: center;
}

/* Socials */
.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b1220 0%, #000612 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid #334155;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(14, 165, 233, 0.3);
}

.social-icon:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.social-icon i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.social-icon:hover i {
    color: white;
}

.socials-lg {
    margin-top: 1rem;
}

.socials {
    display: flex;
    gap: .75rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}

/* Hero image with responsive sizes matching original (256→320→384) */
.hero-img {
    position: relative;
    flex: 1;
    min-width: 256px;
    display: flex;
    justify-content: center;
}

.profile-pic {
    position: relative;
    width: 256px;
    height: 256px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1f2937;
    /* slate-800 */
}

.img-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 256px;
    height: 256px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    filter: blur(40px);
    opacity: .2;
    z-index: 0;
}

@media (min-width:768px) {

    .profile-pic,
    .img-bg {
        width: 320px;
        height: 320px;
    }
}

@media (min-width:1024px) {

    .profile-pic,
    .img-bg {
        width: 384px;
        height: 384px;
    }
}

/* Floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.floating {
    animation: float 3.5s ease-in-out infinite;
}

/* ========== About ========== */
.about-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.about-img {
    position: relative;
    width: 256px;
    height: 256px;
    flex: 0 0 auto;
}

.about-photo {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid #334155;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-img:hover .about-photo {
    border-color: var(--primary);
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.2);
}

.img-bg-rect {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    filter: blur(40px);
    opacity: .2;
    transition: all 0.4s ease;
}

.about-img:hover .img-bg-rect {
    opacity: 0.35;
}

@media (min-width:768px) {
    .about-img {
        width: 256px;
        height: 256px;
    }
}

.about-text {
    flex: 1;
    min-width: 280px;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(126, 34, 206, 0.05));
    border: 1px solid #334155;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.about-grid:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.1);
}

@media (min-width:768px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.about-text h4 {
    margin: .5rem 0 .25rem;
    font-weight: 600;
}

.about-text h4 span {
    color: var(--primary);
    font-weight: 600;
}

/* ========== Skills ========== */
.skills .skills-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width:768px) {
    .skills .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skills>.container>div {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(126, 34, 206, 0.05));
    border: 1px solid #334155;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills>.container>div:hover {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.1);
    transform: translateY(-5px);
}

.skill {
    margin-bottom: 1.5rem;
}

.skill:last-child {
    margin-bottom: 0;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: .6rem;
    font-weight: 500;
}

.skill-header span:first-child {
    color: var(--text);
}

.skill-header span:last-child {
    color: var(--primary);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--panel);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.skill-progress {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Tools & Technologies */
.tools {
    margin-top: 3rem;
}

.tools h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.tools-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1.5rem;
}

@media (min-width:576px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width:768px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width:1024px) {
    .tools-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    text-align: center;
    gap: .75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(126, 34, 206, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.15);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover .icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.4));
}

.icon {
    font-size: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.icon.html {
    color: #f97316
}

.icon.css {
    color: #3b82f6;
}

.icon.js {
    color: #f59e0b;
}

.icon.node {
    color: #22c55e;
}

.icon.db {
    color: #93c5fd;
}

.icon.git {
    color: #ea580c;
}

.icon.sass {
    color: #ec4899;
}

.icon.terminal {
    color: #d1d5db;
}

/* ========== Projects ========== */
.projects-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid #334155;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.3);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image-wrap {
    height: 192px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(126, 34, 206, 0.1));
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.08);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: auto;
}

.card-body h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

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

.card-body p {
    color: var(--muted);
    margin: 0 0 1rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tags span {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    margin: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(126, 34, 206, 0.15));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.3s ease;
}

.tags span:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(126, 34, 206, 0.25));
    border-color: rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

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

.links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.links a:hover::before {
    width: 300px;
    height: 300px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(126, 34, 206, 0.15));
    color: var(--primary);
    border: 2px solid rgba(14, 165, 233, 0.3);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.project-link i {
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.project-link:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.3);
}

.project-link:hover::before {
    width: 100%;
}

.project-link:hover i {
    transform: translateX(2px);
}

.demo-link {
    border-color: rgba(14, 165, 233, 0.5);
}

.code-link {
    border-color: rgba(126, 34, 206, 0.5);
}

.links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

/* Stronger selector to override .links a specificity and ensure project buttons are visible */
.links a.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(126, 34, 206, 0.12));
    color: var(--primary) !important;
    border: 2px solid rgba(14, 165, 233, 0.25) !important;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.links a.project-link i {
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: inherit;
}

.links a.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.links a.project-link:hover {
    color: white !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.25);
}

.links a.project-link:hover::before {
    width: 100%;
}


/* ========== Contact ========== */
.contact-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width:1024px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info h4 {
    margin: .1rem 0;
}

.info-item {
    display: flex;
    gap: .8rem;
    margin: 1rem 0;
}

.info-icon {
    background: #0b1220;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex: 0 0 auto;
}

.contact-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grid-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width:768px) {
    .grid-row {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-input {
    width: 100%;
    padding: .85rem;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    color: var(--text);
    transition: all .25s ease;
}

.contact-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, .2);
    outline: none;
}

.contact-input::placeholder {
    color: #64748b;
}

.btn.full {
    position: relative;
    overflow: hidden;
}

.btn.full::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn.full:active::before {
    width: 300px;
    height: 300px;
}

.btn.full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.contact-form-response {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    animation: slideInUp 0.4s ease-out;
}

.contact-form-response.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.contact-form-response.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Footer ========== */
.footer {
    background: var(--darker);
    padding: 3rem 0;
    border-top: 1px solid #334155;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-left {
    flex: 1;
}

.footer-left p {
    margin: .5rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-right a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(126, 34, 206, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    border: 1px solid #334155;
    transition: all 0.3s ease;
}

.footer-right a:hover {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Ensure project cards have enough room for image + content so tags and links remain visible */
.project-card {
    min-height: 380px;
}

@media (min-width: 768px) {
    .project-card {
        min-height: 420px;
    }

    .project-image-wrap {
        height: 220px;
    }
}

@media (min-width: 1200px) {
    .project-card {
        min-height: 480px;
    }

    .project-image-wrap {
        height: 260px;
    }
}

.footer-bottom {
    border-top: 1px solid #182033;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: #64748b;
}

.heart {
    color: #ef4444;
}

.coffee {
    color: #f59e0b;
}

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.35);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.25rem;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.45);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* Assignments Section */
#assignments {
    background: var(--bg-color);
    padding: 80px 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.assignment-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

#assignments .container h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
}

.assignment-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.assignment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.assignment-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.assignment-card:hover {
    transform: translateY(-10px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.2);
}

.assignment-card:hover::before {
    transform: scaleX(1);
}

.assignment-card:hover::after {
    opacity: 1;
}

.assignment-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(126, 34, 206, 0.2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(14, 165, 233, 0.3);
    position: relative;
    z-index: 2;
}

.assignment-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.assignment-card:hover .assignment-icon {
    color: white;
    border-color: transparent;
    transform: rotate(8deg) scale(1.15);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.4);
}

.assignment-card:hover .assignment-icon::before {
    opacity: 1;
}

.assignment-card h3 {
    font-size: 1.35rem;
    margin: 0 0 0.75rem;
    color: var(--text);
    transition: color 0.3s ease;
    font-weight: 600;
}

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

.assignment-card p {
    color: var(--muted);
    margin: 0 0 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.assignment-card:hover p {
    color: #cbd5e1;
}

.assignment-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(126, 34, 206, 0.15));
    padding: 10px 18px;
    border-radius: 30px;
    border: 2px solid rgba(14, 165, 233, 0.3);
    align-self: flex-start;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.assignment-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(14, 165, 233, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.assignment-cta i {
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.assignment-card:hover .assignment-cta {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(126, 34, 206, 0.25));
    border-color: rgba(14, 165, 233, 0.5);
    color: #0ea5e9;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

.assignment-card:hover .assignment-cta::before {
    width: 150px;
    height: 150px;
}

.assignment-card:hover .assignment-cta i {
    transform: translateX(4px);
}

.project-card {
    min-height: 380px;
}

@media (min-width: 768px) {
    .project-card {
        min-height: 420px;
    }

    .project-image-wrap {
        height: 220px;
    }
}

@media (min-width: 1200px) {
    .project-card {
        min-height: 480px;
    }

    .project-image-wrap {
        height: 260px;
    }
}

.assignment-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(126, 34, 206, 0.15));
    padding: 10px 18px;
    border-radius: 30px;
    border: 2px solid rgba(14, 165, 233, 0.3);
    align-self: flex-start;
}

.assignment-cta i {
    margin-left: 0;
    transition: transform 0.3s ease;
}

.assignment-card:hover .assignment-cta {
    color: var(--primary);
}

.assignment-card:hover .assignment-cta i {
    transform: translateX(5px);
}

/* Dark theme adjustments */
[data-theme="dark"] .assignment-card {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .assignment-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .assignment-container {
        grid-template-columns: 1fr;
    }

    .assignment-card {
        padding: 25px;
    }

    .assignment-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Different icon colors for achievements */
#achievements .education-card .education-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

#achievements .education-card:nth-child(2n) .education-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

#certificates .education-card .education-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

.education-container {
    display: grid;
    gap: 2rem;
}

.education-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.education-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.education-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.15);
}

.education-card:hover::before {
    transform: scaleX(1);
}

.education-card:hover::after {
    opacity: 1;
}

.education-details {
    flex: 1;
    position: relative;
    z-index: 1;
}

.education-details h3 {
    font-size: 1.4rem;
    margin: 0 0 8px;
    color: var(--text);
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.education-details h4 {
    font-size: 1rem;
    color: var(--muted);
    margin: 0 0 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.education-card:hover .education-details h4 {
    color: var(--text);
}

.education-details .date {
    display: inline-block;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(126, 34, 206, 0.15));
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    font-weight: 500;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: all 0.3s ease;
}

.education-card:hover .education-details .date {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(126, 34, 206, 0.25));
    border-color: rgba(14, 165, 233, 0.3);
}

.education-details p {
    color: var(--muted);
    margin: 0 0 1rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.view-certificate {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(126, 34, 206, 0.1));
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.view-certificate i {
    margin-left: 4px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.view-certificate:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(126, 34, 206, 0.2));
    border-color: rgba(14, 165, 233, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
}

.view-certificate:hover i {
    transform: translateX(3px);
}