/* ==============================
   CSS VARIABLES & THEME
============================== */
:root {
    /* Fonts */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Poppins', sans-serif;
    
    /* Typography */
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
    
    /* Font Weight */
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;
    
    /* Z-Index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
    --bg-color: #0b1120;
    --bg-color-alt: #111827;
    --container-color: #1f2937;
    --title-color: #f9fafb;
    --text-color: #d1d5db;
    --text-color-light: #9ca3af;
    --primary-color: #3b82f6;
    --primary-color-alt: #2563eb;
    --accent-color: #8b5cf6;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(17, 24, 39, 0.7);
}

/* Light Theme */
[data-theme="light"] {
    --bg-color: #f9fafb;
    --bg-color-alt: #f3f4f6;
    --container-color: #ffffff;
    --title-color: #111827;
    --text-color: #374151;
    --text-color-light: #6b7280;
    --primary-color: #2563eb;
    --primary-color-alt: #1d4ed8;
    --accent-color: #7c3aed;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
}

/* Responsive Typography */
@media screen and (min-width: 968px) {
    :root {
        --h1-font-size: 3.5rem;
        --h2-font-size: 2.25rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.9rem;
    }
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--title-font);
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==============================
   REUSABLE CSS CLASSES
============================== */
.container {
    max-width: 1100px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section-title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    display: block;
    font-size: var(--small-font-size);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-color);
    font-weight: var(--font-medium);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    font-family: var(--body-font);
}

.button-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.button-primary:hover {
    background-color: var(--primary-color-alt);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.button-outline {
    background-color: transparent;
    color: var(--title-color);
    border: 1px solid var(--border-color);
}

.button-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.button-small {
    padding: 0.5rem 1rem;
    font-size: var(--small-font-size);
}

/* ==============================
   HEADER & NAV
============================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.nav-container {
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-family: var(--title-font);
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
}

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

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    font-size: var(--small-font-size);
    position: relative;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .mobile-toggle {
    background: transparent;
    border: none;
    color: var(--title-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
}

/* Mobile Nav Menu */
@media screen and (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 4rem;
        right: -100%;
        width: 100%;
        height: calc(100vh - 4rem);
        background-color: var(--bg-color);
        padding: 2rem;
        transition: right var(--transition-normal);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.show-menu {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    
    .nav-link {
        font-size: var(--h3-font-size);
    }
}

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

.hero-container {
    grid-template-columns: 1fr;
    align-items: center;
}

.hero-greeting {
    display: block;
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: var(--h1-font-size);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--title-color), var(--text-color-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: var(--h2-font-size);
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
    font-weight: var(--font-medium);
}

.hero-description {
    max-width: 600px;
    margin-bottom: 2rem;
}

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

/* Abstract blob for profile image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Profile wrapper with animated rings */
.profile-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 300px;
}

.profile-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: ripple 3s ease-out infinite;
    opacity: 0;
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.ring-2 {
    width: 115%;
    height: 115%;
    animation-delay: 1s;
    border-color: var(--accent-color);
}

.ring-3 {
    width: 130%;
    height: 130%;
    animation-delay: 2s;
    border-color: var(--primary-color);
    opacity: 0;
}

@keyframes ripple {
    0%   { transform: scale(0.85); opacity: 0.7; }
    100% { transform: scale(1.1);  opacity: 0; }
}

.profile-img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5), 0 20px 40px var(--shadow-color);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    z-index: 1;
}

.profile-img:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 25px 50px var(--shadow-color);
}

@media screen and (min-width: 768px) {
    .hero-container {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .profile-wrapper {
        width: 360px;
        height: 360px;
    }

    .profile-img {
        width: 310px;
        height: 310px;
    }
}

/* ==============================
   ABOUT SECTION
============================== */
.about-container {
    grid-template-columns: 1fr;
}

.about-description {
    margin-bottom: 1.5rem;
}

.about-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
}

.about-box {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: var(--transition-fast);
}

.about-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
    border-color: var(--primary-color);
}

.about-box-clickable {
    cursor: pointer;
    border: 2px dashed var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    animation: pulse-clickable 2s infinite;
    position: relative;
}

.about-box-clickable:hover {
    background: rgba(59, 130, 246, 0.1);
    animation: none;
}

.about-box-clickable::after {
    content: '\f08e'; /* external link icon in font-awesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--primary-color);
    font-size: 1rem;
    opacity: 0.7;
}

@keyframes pulse-clickable {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.about-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-title {
    font-size: var(--small-font-size);
    margin-bottom: 0.25rem;
}

.about-subtitle {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

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

/* ==============================
   SKILLS SECTION
============================== */
.skills-container {
    grid-template-columns: 1fr;
    row-gap: 2rem;
}

.skills-content {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 1rem;
    transition: var(--transition-fast);
}

.skills-content:hover {
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--border-color);
}

.skills-title {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.skills-title i {
    color: var(--primary-color);
}

.skills-box {
    display: flex;
    justify-content: center;
    column-gap: 2.5rem;
}

.skills-group {
    display: grid;
    align-content: flex-start;
    row-gap: 1.5rem;
}

.skills-data {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skills-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.skills-name {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    line-height: 1.2;
}

@media screen and (min-width: 768px) {
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 2rem;
    }
}

/* ==============================
   PROJECTS SECTION
============================== */
.projects-container {
    grid-template-columns: 1fr;
}

.project-card {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition-fast);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-color);
    border-color: var(--primary-color);
}

/* Featured project (TravelNow) — animated gradient border */
@property --featured-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.project-card.featured-project {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--container-color), var(--container-color)) padding-box,
        conic-gradient(from var(--featured-angle), #38bdf8, #818cf8, #c084fc, #38bdf8) border-box;
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.25);
    animation: featured-border-spin 6s linear infinite;
}

.project-card.featured-project:hover {
    border-color: transparent;
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.45), 0 12px 30px var(--shadow-color);
}

@keyframes featured-border-spin {
    to { --featured-angle: 360deg; }
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: var(--smaller-font-size);
    font-weight: bold;
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.bank-gradient {
    background: linear-gradient(135deg, var(--primary-color), #042f2e);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.75rem;
}

.project-description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-bottom: 1.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech li {
    font-size: var(--smaller-font-size);
    background-color: var(--bg-color-alt);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
}

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

/* ==============================
   EVENTS SECTION
============================== */
.events-container {
    grid-template-columns: 1fr;
    row-gap: 3rem;
}

.events-title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.events-title i {
    color: var(--primary-color);
}

.events-description {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Professional Masonry-style Grid */
.events-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px var(--shadow-color);
    border: 2px solid transparent;
    transition: var(--transition-normal);
    aspect-ratio: 4/3;
    /* For 3D Tilt perspective */
    transform-style: preserve-3d;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
    z-index: 2;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(11, 17, 32, 0.8), rgba(0,0,0,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: #fff;
    transform: scale(0) translateZ(30px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1) translateZ(30px);
}

/* Event Separator */
.event-separator {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 4rem auto;
    width: 80%;
    opacity: 0.5;
}

/* Magic Border Animation */
.magic-border {
    padding: 4px;
    background: var(--bg-color-alt);
}

.magic-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, #60a5fa, #bfdbfe);
    animation: rotate-border 2s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.magic-border:hover::before {
    opacity: 1;
}

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: calc(1rem - 4px);
    overflow: hidden;
    z-index: 1;
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media screen and (min-width: 768px) {
    .events-container {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
        column-gap: 3rem;
    }
}

/* ==============================
   CONTACT SECTION
============================== */
.contact-container {
    grid-template-columns: 1fr;
    row-gap: 3rem;
}

.contact-title {
    text-align: center;
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
}

.contact-info {
    display: grid;
    gap: 1rem;
}

.contact-card {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: var(--transition-fast);
}

.contact-card:hover {
    border-color: var(--primary-color);
}

.contact-card-icon {
    font-size: 2rem;
    color: var(--title-color);
    margin-bottom: 0.5rem;
}

.contact-card-title {
    font-size: var(--small-font-size);
}

.contact-card-data {
    display: block;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.contact-button {
    color: var(--primary-color);
    font-size: var(--small-font-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.25rem;
}

.contact-button:hover .contact-button-icon {
    transform: translateX(0.25rem);
}

.contact-button-icon {
    font-size: 1rem;
    transition: var(--transition-fast);
}

.contact-form-div {
    position: relative;
    margin-bottom: 1.5rem;
    height: 4rem;
}

.contact-form-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    outline: none;
    border-radius: 0.5rem;
    padding: 1.5rem;
    font-family: var(--body-font);
    z-index: 1;
    transition: var(--transition-fast);
}

.contact-form-input:focus {
    border-color: var(--primary-color);
}

.contact-form-tag {
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    font-size: var(--smaller-font-size);
    padding: 0 0.25rem;
    background-color: var(--bg-color);
    z-index: 10;
    color: var(--text-color-light);
    font-weight: var(--font-medium);
}

.contact-form-area {
    height: 11rem;
}

.contact-form-area textarea {
    resize: none;
}

@media screen and (min-width: 576px) {
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 968px) {
    .contact-container {
        column-gap: 4rem;
        grid-template-columns: 1fr 1fr;
        align-items: flex-start;
    }
}

/* ==============================
   FOOTER
============================== */
.footer {
    background-color: var(--bg-color-alt);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 2rem;
}

.footer-title {
    color: var(--title-color);
    font-size: var(--h2-font-size);
}

.footer-list {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-color);
}

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

.footer-social {
    display: flex;
    gap: 1.25rem;
}

.footer-social-link {
    background-color: var(--container-color);
    color: var(--title-color);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    border: 1px solid var(--border-color);
}

.footer-social-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.footer-copy {
    display: block;
    margin-top: 2rem;
    color: var(--text-color-light);
    font-size: var(--smaller-font-size);
}

/* ==============================
   SCROLL UP
============================== */
.scrollup {
    position: fixed;
    right: 1.5rem;
    bottom: -20%;
    background-color: var(--primary-color);
    opacity: 0.8;
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
    z-index: var(--z-tooltip);
    transition: var(--transition-normal);
}

.scrollup:hover {
    opacity: 1;
    transform: translateY(-0.25rem);
}

.scrollup-icon {
    font-size: 1.25rem;
    color: #fff;
}

.show-scroll {
    bottom: 3rem;
}

/* ==============================
   ANIMATIONS & EFFECTS
============================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 0.5rem;
    background-color: var(--bg-color-alt);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color-light);
}

/* ==============================
   MEDIA QUERIES (DESKTOP ALIGNMENT)
============================== */
@media screen and (min-width: 992px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==============================
   MODAL (CERTIFICATES)
============================== */
.about-box-clickable {
    cursor: pointer;
    position: relative;
    border-style: solid;
    border-color: var(--primary-color);
    box-shadow: inset 0 0 18px rgba(59, 130, 246, 0.08);
}

.about-box-clickable::after {
    content: '\f08e'; /* External link icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0.85rem;
    right: 0.9rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    opacity: 1;
    animation: cert-arrow 1.6s ease-in-out infinite;
}

.about-box-clickable:hover::after {
    opacity: 1;
}

@keyframes cert-arrow {
    0%, 100% { transform: translate(0, 0); opacity: 0.65; }
    50% { transform: translate(3px, -3px); opacity: 1; }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: var(--z-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active-modal {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--container-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active-modal .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: var(--h3-font-size);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-title i {
    color: var(--primary-color);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background-color: var(--bg-color-alt);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--title-color);
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.cert-card i {
    font-size: 3rem;
    color: #ef4444; /* Red color for PDF */
    transition: transform var(--transition-fast);
}

.cert-card:hover i {
    transform: scale(1.1);
}

.cert-card span {
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
    color: var(--title-color);
}

/* Special Border for First Certificate */
.special-cert {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.special-cert::before {
    content: 'Top';
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 30px;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Featured Harvard CS50 Certificate */
.harvard-cert {
    border: 2px solid #a51c30;
    box-shadow: 0 0 15px rgba(165, 28, 48, 0.35);
    position: relative;
    overflow: hidden;
}

.harvard-cert::before {
    content: 'Harvard';
    position: absolute;
    top: 15px;
    right: -34px;
    background: #a51c30;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 34px;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.harvard-cert i {
    color: #a51c30;
}

/* ==============================
   IMAGE LIGHTBOX
============================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active-lightbox {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active-lightbox .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* ==============================
   PREMIUM FEATURES (CURSOR, SCROLL, PARTICLES)
============================== */
/* Custom Cursor - DISABLED */
/* body {
    cursor: none;
}

.cursor-dot, .cursor-outline {
    display: none;
} */

/* Scroll Progress */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 999999;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    box-shadow: 0 0 10px var(--primary-color);
}

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

/* Ensure Hero content is above particles */
.hero-container {
    position: relative;
    z-index: 1;
}

/* Hide custom cursor on mobile */
@media screen and (max-width: 768px) {
    body {
        cursor: auto;
    }
    .cursor-dot, .cursor-outline {
        display: none;
    }
}

/* Non-actionable buttons (e.g. private repositories) */
.button.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}


/* ==============================
   LANGUAGE SWITCHER
============================== */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--container-color);
    color: var(--title-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-family: inherit;
    font-size: var(--small-font-size);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-btn:hover {
    border-color: var(--primary-color);
}

.lang-btn[aria-expanded="true"] {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lang-icon {
    font-size: 0.95rem;
    opacity: 0.85;
}

.lang-chevron {
    font-size: 0.65rem;
    opacity: 0.7;
    transition: transform 0.25s ease;
}

.lang-btn[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline-end: 0;
    min-width: 170px;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    background: var(--container-color);
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 999;
}

.lang-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.lang-menu li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    cursor: pointer;
    font-size: var(--small-font-size);
    color: var(--text-color);
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-menu li:hover,
.lang-menu li:focus-visible {
    background: rgba(59, 130, 246, 0.12);
    color: var(--title-color);
    outline: none;
}

.lang-menu li.active {
    color: var(--primary-color);
    font-weight: 600;
}

.lang-check {
    font-size: 0.75rem;
    opacity: 0;
}

.lang-menu li.active .lang-check {
    opacity: 1;
}

/* Arabic typography */
html[lang="ar"] body {
    font-family: 'Cairo', 'Inter', sans-serif;
}

/* RTL adjustments */
html[dir="rtl"] .contact-button-icon {
    transform: scaleX(-1);
}

html[dir="rtl"] .project-badge {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .about-box-clickable::after {
    right: auto;
    left: 0.9rem;
}

html[dir="rtl"] .scrollup {
    right: auto;
    left: 1.5rem;
}

@media screen and (max-width: 480px) {
    .lang-switcher .lang-icon {
        display: none;
    }

    .lang-btn {
        padding: 0.35rem 0.55rem;
        font-size: 0.7rem;
    }

    .nav-actions {
        gap: 0.6rem;
    }
}
