/* General */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

h5 {
    background-color: rgb(255, 0, 0);
    font-size: 30px;
    padding: 20px;
}
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: #121212;
    color: #fff;
    text-align: center;
}

/* Header */
header {
    background: rgba(34, 34, 34, 0.9);
    color: white;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background 0.3s;
}

/* استایل کلی منو */
nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

/* آیتم‌های منو */
nav ul li {
    margin: 0 10px;
}

/* لینک‌های منو */
nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

/* هاور لینک‌های منو */
nav ul li a:hover {
    color: #f4a261;
}

/* نسخه دسکتاپ - افزایش فاصله بین آیتم‌ها */
@media (min-width: 769px) {
    nav ul li {
        margin: 0 20px; /* فاصله‌ی بیشتر بین آیتم‌های منو */
    }
    nav ul li a {
        letter-spacing: 2px; /* افزایش فاصله بین حروف */
        word-spacing: 15px; /* افزایش فاصله بین کلمات */
    }
}

/* نسخه موبایل - منوی همبرگری */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
        position: relative;
    }

    header h1 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
        padding: 0 50px 0 10px !important;
    }

    nav {
        position: relative;
    }

    nav ul {
        display: none !important;
        flex-direction: column !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(34, 34, 34, 0.98);
        padding: 10px 0 !important;
        margin: 0 !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        z-index: 1001;
        gap: 0 !important;
        justify-content: flex-start !important;
    }

    nav ul.active {
        display: flex !important;
    }

    nav ul li {
        margin: 0 !important;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        letter-spacing: 0 !important;
        word-spacing: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center !important;
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    /* دکمه همبرگر */
    .menu-toggle {
        display: block !important;
        position: absolute;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        z-index: 1002;
        padding: 5px 10px;
        transition: color 0.3s;
    }

    .menu-toggle:hover {
        color: #ff6b00;
    }

    .menu-toggle:focus {
        outline: 2px solid rgba(255, 107, 0, 0.5);
        outline-offset: 2px;
    }
}

/* دکمه همبرگر - مخفی در دسکتاپ */
.menu-toggle {
    display: none;
}

/* نسخه موبایل کوچک */
@media (max-width: 480px) {
    header h1 {
        font-size: 14px !important;
        padding: 0 45px 0 10px !important;
    }

    nav ul li a {
        font-size: 13px !important;
        padding: 10px 15px !important;
    }

    .menu-toggle {
        font-size: 20px;
        right: 10px;
    }
}





/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.3s, background 0.3s;
}

/* لینکدین */
.social-icon.linkedin {
    background: #0077b5; /* رنگ برند لینکدین */
}

.social-icon.linkedin:hover {
    background: #005582;
    transform: scale(1.1);
}

/* گیت‌هاب */
.social-icon.github {
    background: #333;
}

.social-icon.github:hover {
    background: #222;
    transform: scale(1.1);
}

/* اینستاگرام */
.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #bc1888 0%, #cc2366 25%, #dc2743 50%, #e6683c 75%, #f09433 100%);
    transform: scale(1.1);
}

/* Social Icons in Contact Section */
.social-icons-contact {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}




nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    justify-content: center;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #f4a261;
}

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: rgb(255, 255, 255);
    background: url('background.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* این باعث میشه بک‌گراند ثابت بمونه (پارالاکس) */
}

.hero-content {
    text-align: center;
}


.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}


.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid white;
    object-fit: cover;
}

/* Sections */
.container {
    padding: 80px 0;
    width: 80%;
    margin: auto;
}







/* استایل عنوان About Me */
.about-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
}

/* استایل کلی بخش About Me */
#about {
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
    padding: 50px 20px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin: auto;
}

/* استایل متن درباره من */
.about-text {
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
}

/* هایلایت متن‌های مهم */
.highlight {
    color: #ff6b00;
    font-weight: bold;
}

/* انیمیشن نرم برای نمایش متن */
.about-text p {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.about-text p:nth-child(1) { animation-delay: 0.2s; }
.about-text p:nth-child(2) { animation-delay: 0.4s; }
.about-text p:nth-child(3) { animation-delay: 0.6s; }
.about-text p:nth-child(4) { animation-delay: 0.8s; }
.about-text p:nth-child(5) { animation-delay: 1s; }
.about-text p:nth-child(6) { animation-delay: 1.2s; }

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

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    #about {
        max-width: 90%;
        padding: 20px 15px; /* کاهش پدینگ */
    }

    .about-text {
        font-size: 14px; /* کاهش سایز فونت */
        text-align: center;
        line-height: 1.4; /* فشرده‌تر کردن متن */
    }
}








/* تنظیمات Work Experience */
#experience {
    position: relative;
    padding: 70px 0;
    text-align: center;
}

/* آیتم‌های تایم‌لاین */
.timeline-item {
    position: relative;
    width: 60%; /* برای دسکتاپ */
    margin: 60px auto;
    opacity: 0;
    transform: translateY(40px); /* حرکت نرم از پایین به بالا */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    text-align: center; /* محتوای داخل کارت‌ها وسط‌چین شود */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* وقتی کارت نمایش داده شد */
.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* استایل کارت تایم‌لاین */
.timeline-box {
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9), rgba(58, 58, 58, 0.9));
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.1);
    min-height: 220px;
    width: 100%;
    max-width: 600px; /* کنترل حداکثر عرض */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    text-align: center;
    margin: auto; /* وسط‌چین کردن کارت */
}

/* افکت هاور کارت‌ها */
.timeline-box:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(255, 94, 0, 0.7);
}

/* عنوان کارت */
.timeline-box h3 {
    font-size: 24px;
    color: #ff6b00;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-align: center;
}

/* تاریخ */
.timeline-box span {
    font-size: 16px;
    color: #ddd;
    margin-bottom: 15px;
    font-style: italic;
    display: block;
    text-align: center;
}

/* لیست آیتم‌ها */
.timeline-box ul {
    padding-left: 0;
    list-style: none;
    text-align: center;
    width: 100%;
}

/* آیتم‌های لیست */
.timeline-box ul li {
    font-size: 16px;
    color: white;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    position: relative;
    padding-left: 25px;
    text-align: center;
}

/* افکت نمایش خط به خط */
.timeline-box ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff6b00;
    font-size: 20px;
    font-weight: bold;
}


/* لینک‌های داخل timeline-box */
.timeline-box ul li a {
    color: #FF6B00 !important; /* رنگ نارنجی برای لینک‌ها */
    text-decoration: none; /* حذف خط زیر لینک */
    transition: color 0.3s ease-in-out; /* انیمیشن نرم برای تغییر رنگ */
}

/* افکت هاور برای لینک‌ها */
.timeline-box ul li a:hover {
    color: #e65c00 !important; /* رنگ کمی تیره‌تر هنگام هاور */
    text-decoration: underline; /* افزودن خط زیر هنگام هاور */
}



/* وقتی اسکرول شد، لیست خط به خط باز شود */
.timeline-box ul li.show-line {
    opacity: 1;
    transform: translateY(0);
}

/* تنظیمات نمایش Work Experience در موبایل */
@media (max-width: 768px) {
    .timeline-item {
        width: 100%;
        max-width: 100%;
        margin: 15px auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .timeline-box {
        max-width: 850px; /* قبلاً 100% بود، حالا مثل تحصیلات 850px شد */
        width: 90%; /* جلوگیری از کشیدگی زیاد */
        padding: 30px;
        font-size: 16px; /* برای خوانایی بهتر */
        margin: auto;
    }

    .timeline-box h3 {
        font-size: 22px; /* کمی بزرگ‌تر کردن عنوان */
        white-space: normal; /* اجازه شکستن متن به چند خط */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .timeline-box ul li {
        padding-left: 30px;
    }
       .timeline-box ul li::before {
        left: 5px; /* حرکت دایره کمی به چپ */
    }
}





/* بخش Education */
/* عنوان خارج از باکس */
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px; /* فاصله مناسب از باکس Education */
}

/* کاهش ارتفاع کلی باکس */
#education {
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
    padding: 40px 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: 0 6px 15px rgba(255, 140, 0, 0.5);
    max-width: 850px;
    margin: auto;
}

/* جعبه Education */
.education-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: left;
    min-height: 60px; /* کاهش ارتفاع */
    padding: 5px 0; /* کاهش padding */
}

/* آیکون دانشگاه */
.education-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    padding: 10px;
    transition: transform 0.3s ease-in-out;
}

.education-icon:hover {
    transform: scale(1.1);
}

/* اطلاعات تحصیلی */
.education-text {
    text-align: left;
}

.education-text h3 {
    font-size: 24px;
    color: #ff6b00;
    margin-bottom: 8px;
}

.education-year {
    font-size: 16px;
    color: #ddd;
    font-style: italic;
    margin-bottom: 12px;
}

.education-desc {
    font-size: 18px;
    line-height: 1.6;
    color: #e0e0e0;
}

/* هایلایت متن‌های کلیدی */
.highlight {
    color: #ff6b00;
    font-weight: bold;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    #education {
        max-width: 95%; /* افزایش عرض باکس تحصیلات */
        padding: 25px 15px; /* کاهش فضای داخلی */
        text-align: center; /* وسط چین کردن محتوا */
    }

    .education-box {
        flex-direction: column; /* چیدن آیتم‌ها به‌صورت ستونی در موبایل */
        align-items: center;
        text-align: center;
    }

    .education-icon {
        width: 80px; /* کاهش اندازه آیکون دانشگاه */
        height: 80px;
        margin-bottom: 10px; /* فاصله پایین‌تر از متن */
    }

    .education-text {
        text-align: center; /* وسط چین کردن کل متن */
    }

    .education-text h3 {
        font-size: 20px; /* کمی کوچک‌تر برای هماهنگی */
        text-align: center;
        white-space: normal; /* اجازه به شکست متن در موبایل */
    }

    .education-year {
        font-size: 16px;
        color: #ddd;
        font-style: italic;
        display: block; /* نمایش خط جداگانه */
        margin-bottom: 8px;
    }

    .education-desc {
        font-size: 14px; /* کاهش سایز فونت توضیحات */
        line-height: 1.5;
        text-align: center; /* وسط چین کردن متن */
    }
}












/* ICPC Competition Experience Section - Terminal Style */
#icpc-experience {
    padding: 80px 0;
    max-width: 1100px;
    margin: auto;
}

.icpc-terminal {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.terminal-window {
    width: 100%;
    max-width: 900px;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 107, 0, 0.2);
    overflow: hidden;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    transition: all 0.3s ease;
}

.terminal-window:hover {
    box-shadow: 0 25px 70px rgba(255, 107, 0, 0.4), 0 0 0 1px rgba(255, 107, 0, 0.4);
    transform: translateY(-2px);
}

.terminal-header-bar {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(255, 107, 0, 0.3);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-btn.close {
    background: #ff5f56;
}

.terminal-btn.minimize {
    background: #ffbd2e;
}

.terminal-btn.maximize {
    background: #27c93f;
}

.terminal-title-bar {
    color: #00ff00;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-title-bar i {
    color: #ff6b00;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px rgba(255, 107, 0, 0.5); }
    to { text-shadow: 0 0 15px rgba(255, 107, 0, 0.8), 0 0 25px rgba(255, 107, 0, 0.5); }
}

.terminal-body {
    background: #0d1117;
    padding: 25px;
    min-height: 400px;
    color: #c9d1d9;
    font-size: 14px;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terminal-prompt {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.terminal-command {
    color: #58a6ff;
}

.terminal-output {
    margin: 15px 0;
    padding-left: 20px;
}

.code-line {
    margin: 8px 0;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

.code-line.indent-1 {
    padding-left: 20px;
}

.code-keyword {
    color: #ff7b72;
    font-weight: bold;
}

.code-variable {
    color: #79c0ff;
}

.code-property {
    color: #79c0ff;
}

.code-string {
    color: #a5d6ff;
}

.code-number {
    color: #79c0ff;
    font-weight: bold;
}

.achievements-display {
    margin: 20px 0;
    padding: 20px;
    background: rgba(13, 17, 23, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.achievement-badge {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9), rgba(58, 58, 58, 0.9));
    border: 2px solid;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

.achievement-badge:last-child {
    margin-bottom: 0;
}

.achievement-badge:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.4);
}

.achievement-gold {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 193, 7, 0.15));
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.achievement-gold i {
    color: #ffd700;
    font-size: 40px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.achievement-silver {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(169, 169, 169, 0.15));
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

.achievement-silver i {
    color: #c0c0c0;
    font-size: 40px;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.achievement-badge div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-badge strong {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

.achievement-badge span {
    color: #00ff00;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
}

.icpc-image-container {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    padding: 15px 0;
    background: rgba(13, 17, 23, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.icpc-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 107, 0, 0.4);
    transition: all 0.3s ease;
}

.icpc-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 107, 0, 0.6);
    border-color: rgba(255, 107, 0, 0.8);
}

.blinking-cursor {
    margin-top: 10px;
}

.cursor-blink {
    color: #00ff00;
    animation: blink 1s step-end infinite;
    font-weight: bold;
}

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

/* Responsive Design for ICPC Section */
@media (max-width: 768px) {
    #icpc-experience {
        padding: 40px 10px;
    }

    .icpc-terminal {
        padding: 10px;
    }

    .terminal-window {
        margin: 0;
        max-width: 100%;
        border-radius: 6px;
    }

    .terminal-header-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .terminal-title-bar {
        font-size: 11px;
        flex: 1;
        min-width: 200px;
        margin-top: 5px;
    }

    .terminal-buttons {
        gap: 6px;
    }

    .terminal-btn {
        width: 10px;
        height: 10px;
    }

    .terminal-body {
        padding: 15px 10px;
        font-size: 11px;
        min-height: auto;
    }

    .terminal-line {
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .terminal-prompt {
        font-size: 11px;
    }

    .terminal-command {
        font-size: 11px;
        word-break: break-all;
    }

    .terminal-output {
        margin: 10px 0;
        padding-left: 10px;
    }

    .code-line {
        font-size: 10px;
        margin: 5px 0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .code-line.indent-1 {
        padding-left: 15px;
    }

    .icpc-image-container {
        padding: 15px 0;
        margin: 15px 0;
    }

    .icpc-image {
        max-width: 90%;
        border-radius: 6px;
    }

    .achievements-display {
        padding: 15px 10px;
        margin: 15px 0;
    }

    .achievement-badge {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
        gap: 12px;
        margin-bottom: 12px;
    }

    .achievement-badge:hover {
        transform: translateY(-3px);
    }

    .achievement-badge i {
        font-size: 32px;
    }

    .achievement-badge strong {
        font-size: 13px;
        line-height: 1.4;
    }

    .achievement-badge span {
        font-size: 16px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    #icpc-experience {
        padding: 30px 5px;
    }

    .terminal-body {
        padding: 12px 8px;
        font-size: 10px;
    }

    .terminal-title-bar {
        font-size: 10px;
    }

    .code-line {
        font-size: 9px;
    }

    .achievement-badge {
        padding: 12px 8px;
    }

    .achievement-badge i {
        font-size: 28px;
    }

    .achievement-badge strong {
        font-size: 12px;
    }

    .achievement-badge span {
        font-size: 14px;
    }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* دو ستون در هر ردیف */
    gap: 40px 160px; 
    justify-content: center;  
    align-items: center;
    width: 70%; /* تنظیم عرض کلی */
    margin: 40px auto; /* فاصله متناسب از بالا */
    transform: translateX(-20px); 
}

/* عنوان بخش */
.skills-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px; /* ایجاد فاصله بین عنوان و کارت‌ها */
}

/* کارت‌های مهارت */
.skill-category {
    background: linear-gradient(135deg, #ff9800, #ff3d00); /* گرادیان نارنجی براق */
    padding: 20px;
    border-radius: 12px;
    height: 220px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 94, 0, 0.7); /* درخشش کارت */
    overflow: hidden;
}

/* افکت هاور */
.skill-category:hover {
    background: linear-gradient(135deg, #ff6b00, #ff2400);
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(255, 69, 0, 0.7);
}


/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr; /* در موبایل هر کارت تک‌ستونه بشه */
        justify-content: center;  
        align-items: center;
        width: 100%;
        gap: 20px;
        transform: none; /* حذف جابجایی در موبایل */
    }
    .skill-category {
        width: 80%;
        height: auto;
        margin: auto; /* وسط چین کردن در موبایل */
    }
}








.certifications-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.certification-card {
    background: linear-gradient(135deg, #2c2c2c, #444);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    width: 220px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.5);
    transition: transform 0.3s ease;
}

.certification-card:hover {
    transform: scale(1.05);
}

.certification-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}





/* عنوان Projects خارج از مستطیل */
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
}

/* استایل کلی پروژه‌ها */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* کارت پروژه */
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    min-height: 450px; /* حداقل ارتفاع برای تطبیق با محتوا */
    background: #2c2c2c;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-sizing: border-box;
}

/* افکت هاور کارت پروژه */
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 94, 0, 0.7);
}

/* عنوان پروژه */
.project-card h3 {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b00;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.3;
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

/* توضیحات پروژه */
.project-card p {
    flex-grow: 1;
    text-align: center;
    padding: 10px 0;
    margin: 0 0 10px 0;
    line-height: 1.5;
    min-height: 50px;
}

/* Tech Stack در کارت پروژه */
.project-card .project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 15px 0;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}

/* دکمه‌های پروژه */
.project-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}



.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

/* دکمه GitHub */
.btn.github {
    background: #333;
    color: white;
}

.btn.github:hover {
    background: #222;
    transform: scale(1.05);
}

/* دکمه Live Demo */
.btn.demo {
    background: #ff6b00;
    color: white;
}

.btn.demo:hover {
    background: #e65c00;
    transform: scale(1.05);
}



@media (max-width: 768px) {
    .project-card {
        width: 90%;
        max-width: 600px;
        padding: 20px;
        min-height: auto;
    }

    .project-card img {
        height: 200px;
    }
    
    .project-card h3 {
        font-size: 18px;
        text-align: center;
        min-height: auto;
        margin-bottom: 10px;
    }

    .project-card p {
        font-size: 14px;
        text-align: center;
        padding: 10px 0;
        min-height: auto;
    }
}







/* Contact Section */
#contact {
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
    padding: 40px 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: 0 6px 15px rgba(255, 140, 0, 0.5);
    max-width: 850px;
    margin: auto;
    margin-bottom: 50px; /* فاصله مناسب از فوتر */
}
.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
}
.contact-info {
    font-size: 18px;
}

.contact-info p {
    margin: 10px 0;
}

.contact-info i {
    color: #ff6b00;
    margin-right: 8px;
}


.email-link, 
.email-link:visited, 
.email-link:active {
    color: white !important; /* تنظیم رنگ سفید در همه حالت‌ها */
    text-decoration: none !important; /* حذف خط زیر لینک */
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

/* تغییر رنگ هنگام هاور */
.email-link:hover {
    color: #f4a261 !important; /* رنگ نارنجی هنگام هاور */
    text-decoration: underline !important;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .contact-info {
        text-align: center;
    }
}











/* Footer */
footer {
    background: #222;
    color: white;
    padding: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    footer {
        padding: 15px;
        font-size: 14px;
    }
}






/* From Uiverse.io - Terminal Loader */
@keyframes blinkCursor {
  50% {
    border-right-color: transparent;
  }
}

@keyframes typeAndDelete {
  0%,
  10% {
    width: 0;
  }
  45%,
  55% {
    width: 6.2em;
  } 
  90%,
  100% {
    width: 0;
  }
}

/* انیمیشن محو شدن کل صفحه لودینگ */
@keyframes fullScreenFadeOut {
  0% {
    opacity: 1;
    filter: blur(0px);
  }
  50% {
    opacity: 0.6;
    filter: blur(3px);
  }
  100% {
    opacity: 0;
    filter: blur(10px);
  }
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

/* افکت باران کد هکری */
#matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
}

/* استایل باکس لودینگ */
.terminal-loader {
  border: 0.1em solid #333;
  background-color: #1a1a1a;
  color: #0f0;
  font-family: "Courier New", Courier, monospace;
  font-size: 1em;
  padding: 1.5em 1em;
  width: 12em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 9999;
}

.terminal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5em;
  background-color: #333;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  padding: 0 0.4em;
  box-sizing: border-box;
}

.terminal-controls {
  float: right;
}

.control {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.4em;
  border-radius: 50%;
  background-color: #777;
}

.control.close {
  background-color: #e33;
}

.control.minimize {
  background-color: #ee0;
}

.control.maximize {
  background-color: #0b0;
}

.terminal-title {
  float: left;
  line-height: 1.5em;
  color: #eee;
}

.text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 0.2em solid green;
  animation:
    typeAndDelete 4s steps(11) infinite,
    blinkCursor 0.5s step-end infinite alternate;
  margin-top: 1.5em;
}

/* اجرای انیمیشن محو شدن برای کل صفحه */
.hidden {
  animation: fullScreenFadeOut 1s ease-in-out forwards;
}












/* Improved pop-up styling */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 20, 0.95);
    padding: 25px;
    width: 370px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
    text-align: center;
    color: white;
    z-index: 10000;
    display: none; /* Initially hidden */
    animation: fadeIn 0.3s ease-in-out;
    border: 1px solid cyan;
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -55%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Pop-up content */
.popup-content {
    padding: 20px;
}

/* Headline */
#popup h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: cyan;
}

/* Privacy assurance text */
#popup p {
    font-size: 16px;
    line-height: 1.6;
    color: #ddd;
}

/* Hand scroll activation button */
#activateHandScrollBtn {
    background: cyan;
    color: black;
    font-size: 16px;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
    display: inline-block; /* Ensure visibility */
    margin-top: 15px;
}

#activateHandScrollBtn:hover {
    background: #00bcd4;
    transform: scale(1.1);
}

/* Close button */
#closePopupBtn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.3s;
}

#closePopupBtn:hover {
    color: red;
}


/* Floating Hand Scroll Button with Animated Gradient */
#handScrollBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, #00c3ff, #0082ff, #00c3ff);
    background-size: 200% 200%;
    color: white;
    font-size: 16px;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0px 4px 10px rgba(0, 132, 255, 0.5);
    transition: all 0.3s ease-in-out;
    z-index: 9999;
    animation: moveGradient 3s infinite alternate;
}

/* Hover effect */
#handScrollBtn:hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 15px rgba(0, 195, 255, 0.8);
}
@media (max-width: 768px) {
    #handScrollBtn {
        font-size: 14px;  /* کاهش سایز فونت */
        padding: 8px 14px; /* کاهش پدینگ */
        bottom: 15px;
        right: 15px;
    }
}
/* Moving gradient animation */
@keyframes moveGradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Responsive Popup for Mobile */
@media (max-width: 480px) {
    #popup {
        width: 80%;
        padding: 18px;
        max-width: 280px; /* Reduced width */
        border-radius: 10px;
    }

    #popup h2 {
        font-size: 16px;
    }

    #popup p {
        font-size: 13px;
    }

    #activateHandScrollBtn {
        font-size: 13px;
        padding: 8px 12px;
    }
}




/* Adjust webcam preview position */
#webcamCanvas {
    position: fixed;
    top: 70px; /* Adjust for header */
    right: 20px; /* Stick to right side */
    width: 250px;
    height: 180px;
    border: 2px solid cyan;
    z-index: 9999;
}




/* Floating Language Switcher - Improved */
.floating-language-switcher {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.floating-language-switcher a {
    display: block;
    background: none;
    padding: 0;
}

.floating-language-switcher img {
    width: 40px;  /* اندازه بزرگتر */
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;  /* حاشیه سفید نازک */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    object-fit: cover;
}

.floating-language-switcher:hover img {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10000;
}

.scroll-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b00, #ff8c00);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
}

.back-to-top:focus {
    outline: 3px solid rgba(255, 107, 0, 0.5);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Experience Metrics */
.experience-metrics {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.metric-badge {
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* Skills with Progress Bars */
.skills-category-section {
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.skills-category-title {
    font-size: 24px;
    color: #ff6b00;
    margin-bottom: 20px;
    text-align: center;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9), rgba(58, 58, 58, 0.9));
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skill-name {
    font-weight: bold;
    color: #fff;
    font-size: 18px;
}

.skill-level {
    color: #ddd;
    font-size: 14px;
    font-style: italic;
}

.skill-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b00, #ff8c00);
    border-radius: 10px;
    transition: width 1s ease-out;
}

.skills-grid-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tag {
    background: rgba(255, 107, 0, 0.2);
    color: #ff6b00;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid rgba(255, 107, 0, 0.4);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 107, 0, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .skill-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .skill-level {
        font-size: 12px;
    }
}

/* Project Tech Stack */
.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    justify-content: center;
}

.tech-tag {
    background: rgba(255, 107, 0, 0.15);
    color: #ff6b00;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(255, 107, 0, 0.25);
    transform: translateY(-2px);
}

.project-status {
    margin-top: 10px;
    color: #ff6b00;
    font-size: 14px;
}

/* Testimonials Section */
#testimonials {
    padding: 80px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.testimonial-card {
    background: linear-gradient(135deg, rgba(44, 44, 44, 0.9), rgba(58, 58, 58, 0.9));
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
    border-color: rgba(255, 107, 0, 0.4);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.6;
    color: #e0e0e0;
    font-style: italic;
    position: relative;
    padding-left: 20px;
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 60px;
    color: #ff6b00;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.testimonial-author {
    border-top: 1px solid rgba(255, 107, 0, 0.2);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.testimonial-author strong {
    color: #ff6b00;
    font-size: 16px;
}

.testimonial-author span {
    color: #aaa;
    font-size: 14px;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
}

/* Elevator Pitch Styling */
.elevator-pitch {
    font-size: 20px;
    font-weight: 600;
    color: #ff6b00;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: rgba(255, 107, 0, 0.1);
    border-radius: 10px;
    border-left: 4px solid #ff6b00;
}

@media (max-width: 768px) {
    .elevator-pitch {
        font-size: 16px;
        padding: 12px;
    }
}

/* Improved Touch Targets for Mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    nav ul li a {
        padding: 10px 8px;
    }
}

/* Improved Focus Indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(255, 107, 0, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ARIA Improvements */
[role="button"] {
    cursor: pointer;
}

[aria-hidden="true"] {
    display: none;
}

/* ============================================
   DESIGN UPGRADE — visual enhancements layer
   ============================================ */

:root {
    --accent: #ff6b00;
    --accent-2: #ff8c00;
    --accent-glow: rgba(255, 107, 0, 0.45);
}

/* Animated gradient background accent behind hero */
#hero {
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 107, 0, 0.18), transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(255, 140, 0, 0.15), transparent 45%),
                linear-gradient(180deg, rgba(18,18,18,0.55), rgba(18,18,18,0.85));
    background-size: 200% 200%;
    animation: heroGradientShift 18s ease-in-out infinite alternate;
    z-index: 0;
}

#hero .hero-content {
    position: relative;
    z-index: 1;
}

@keyframes heroGradientShift {
    0%   { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Glow + scale on profile picture */
.profile-pic {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 0 0 rgba(255,107,0,0);
}

.profile-pic:hover {
    transform: scale(1.06) rotate(2deg);
    box-shadow: 0 0 35px var(--accent-glow);
}

/* Hero title gradient text */
#hero h2 {
    background: linear-gradient(90deg, #fff, var(--accent-2), #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shineText 6s linear infinite;
    font-weight: 700;
}

@keyframes shineText {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Header glass effect on scroll-friendly base */
header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 107, 0, 0.15);
}

header h1 {
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 1px;
}

/* Section reveal-on-scroll animation hook */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline box glass + hover lift */
.timeline-box {
    background: linear-gradient(135deg, rgba(40,40,40,0.85), rgba(28,28,28,0.85));
    border: 1px solid rgba(255, 107, 0, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.timeline-box:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 30px rgba(255, 107, 0, 0.2);
    border-color: rgba(255, 107, 0, 0.4);
}

/* About section subtle glow border */
#about {
    border: 1px solid rgba(255, 107, 0, 0.1);
    transition: box-shadow 0.4s ease;
}

#about:hover {
    box-shadow: 0 6px 25px rgba(255, 107, 0, 0.18);
}

/* Section titles get an animated underline accent */
.section-title,
.about-title,
#experience h2,
#skills h2,
#projects h2,
#testimonials .section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after,
.about-title::after,
#experience h2::after,
#skills h2::after,
#projects h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 3px;
    transition: width 0.6s ease;
}

.section-title:hover::after,
.about-title:hover::after,
#experience h2:hover::after,
#skills h2:hover::after,
#projects h2:hover::after {
    width: 100%;
}

/* Skill tags micro-interaction */
.skill-tag {
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.5s ease;
}

.skill-tag:hover::before {
    left: 100%;
}

/* Social icons floating bounce */
.social-icon {
    animation: socialFloat 4s ease-in-out infinite;
}

.social-icon:nth-child(2) { animation-delay: 0.4s; }
.social-icon:nth-child(3) { animation-delay: 0.8s; }

@keyframes socialFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Cursor blink glow for the terminal section */
.cursor-blink {
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Smooth scroll for whole page */
html {
    scroll-behavior: smooth;
}

/* Subtle parallax-ish tilt for ICPC terminal window */
.terminal-window {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.terminal-window:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.15);
}

/* Typing effect cursor */
.hero-content > p {
    display: inline-block;
    min-height: 1.6em;
}

#typed-subtitle::after {
    content: "|";
    display: inline-block;
    margin-left: 4px;
    color: var(--accent);
    animation: blinkCaret 0.9s step-end infinite;
}

@keyframes blinkCaret {
    50% { opacity: 0; }
}

/* Stats Section */
#stats {
    padding: 40px 0 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: linear-gradient(135deg, rgba(44,44,44,0.9), rgba(58,58,58,0.9));
    border: 1px solid rgba(255,107,0,0.15);
    border-radius: 16px;
    padding: 30px 15px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.stat-card i {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.stat-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 12px 30px rgba(255,107,0,0.25);
    border-color: rgba(255,107,0,0.5);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
}

.stat-plus {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    margin-top: 8px;
    color: #ccc;
    font-size: 14px;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .stat-card {
        padding: 20px 10px;
    }
    .stat-number {
        font-size: 28px;
    }
}

/* Gradient section dividers */
#experience::before,
#education::before,
#icpc-experience::before,
#skills::before,
#projects::before,
#testimonials::before,
#contact::before {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin: 0 auto 50px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

/* Footer creative touch */
footer {
    position: relative;
    text-align: center;
    padding: 30px 0;
    color: #999;
    border-top: 1px solid rgba(255,107,0,0.1);
    background: linear-gradient(180deg, transparent, rgba(255,107,0,0.04));
}

footer::before {
    content: "</>";
    display: block;
    font-size: 14px;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 8px;
    font-family: monospace;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 10px;
}

/* Selection highlight */
::selection {
    background: var(--accent);
    color: #111;
}


/* ============================================
   DESIGN UPGRADE v2 — extra creative layer
   ============================================ */

/* Animated floating blobs in background */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    z-index: -1;
    pointer-events: none;
}

body::before {
    width: 400px; height: 400px;
    background: var(--accent);
    top: -100px; left: -120px;
    animation: blobFloat1 22s ease-in-out infinite alternate;
}

body::after {
    width: 500px; height: 500px;
    background: #ff3d00;
    bottom: -150px; right: -150px;
    animation: blobFloat2 26s ease-in-out infinite alternate;
}

@keyframes blobFloat1 {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(120px, 80px) scale(1.3); }
}

@keyframes blobFloat2 {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(-100px, -60px) scale(1.2); }
}

/* Project cards: gradient border + tilt hover */
.project-card {
    position: relative;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(40,40,40,0.9), rgba(25,25,25,0.9));
    border: 1px solid rgba(255,107,0,0.12);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), transparent 40%, transparent 60%, var(--accent-2));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 16px 40px rgba(255, 107, 0, 0.25);
    border-color: transparent;
}

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

.project-card img {
    transition: transform 0.6s ease, filter 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.06);
    filter: brightness(1.1) saturate(1.1);
}

/* Project title accent */
.project-card h3 {
    position: relative;
    display: inline-block;
}

.project-card h3::before {
    content: "✦";
    color: var(--accent);
    margin-right: 8px;
    display: inline-block;
    animation: sparkleSpin 4s linear infinite;
}

@keyframes sparkleSpin {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.3); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Skill progress fill — animated gradient shimmer */
.skill-progress-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% 100%;
    animation: progressShimmer 3s linear infinite;
    box-shadow: 0 0 10px var(--accent-glow);
}

@keyframes progressShimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Skill item hover glow */
.skill-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-item:hover {
    transform: translateX(6px);
    border-color: rgba(255, 107, 0, 0.45);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.12);
}

/* Section heading icon decoration */
h2 {
    position: relative;
}

/* Achievement badges glow pulse */
.achievement-badge {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.achievement-badge:hover {
    transform: scale(1.04);
    box-shadow: 0 0 25px var(--accent-glow);
}

.achievement-badge i {
    animation: medalPulse 2.5s ease-in-out infinite;
}

@keyframes medalPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--accent)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 8px var(--accent)); }
}

/* Tech tags pop on hover */
.tech-tag {
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), background 0.3s ease, color 0.3s ease;
}

.tech-tag:hover {
    transform: scale(1.12) translateY(-2px);
    background: var(--accent);
    color: #111;
    font-weight: 600;
}

/* Education box creative styling */
.education-box {
    position: relative;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(40,40,40,0.85), rgba(28,28,28,0.85));
    border: 1px solid rgba(255,107,0,0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.education-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(255, 107, 0, 0.18);
}

.education-icon {
    transition: transform 0.5s ease;
}

.education-box:hover .education-icon {
    transform: rotateY(360deg);
}

/* Certification cards flair */
.certification-card {
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border-radius: 12px;
    overflow: hidden;
}

.certification-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    box-shadow: 0 12px 25px rgba(255, 107, 0, 0.2);
}

/* Contact section gradient button flair */
#contact .social-icons-contact .social-icon {
    animation: socialFloat 4s ease-in-out infinite;
}

/* Footer-ish gradient divider before contact */
#contact {
    position: relative;
    padding-top: 60px;
}

#contact::before {
    content: "";
    display: block;
    width: 120px;
    height: 4px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 4px;
}

/* Gentle floating animation for hero profile pic */
.profile-container {
    animation: gentleFloat 5s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Highlight text glow pulse */
.highlight {
    text-shadow: 0 0 0 transparent;
    transition: text-shadow 0.3s ease;
}

.highlight:hover {
    text-shadow: 0 0 12px var(--accent-glow);
}