/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */

:root {
    --primary-color: #3deaa4;
    --primary-rgb: 61, 234, 164;
    --secondary-color: #61fdb0;
    --highlight-color: #51ff00;
    --accent-blue: #5053fb;
    --background-dark: #111318;
    --background-light: #22252d;
    --text-primary: #ffffff;
    --text-secondary: #ccc;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body, html {
    height: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

body.noscroll {
    overflow: hidden;
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--background-dark);
    text-shadow: none;
}

::selection {
    background: var(--primary-color);
    color: var(--background-dark);
    text-shadow: none;
}

a {
    display: inline-block;
    transition: all var(--transition-speed) ease;
    color: var(--primary-color);
    text-decoration: none;
}

a:hover,
a:active {
    text-decoration: none;
    outline: 0;
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

p {
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
}

.highlight {
    color: var(--highlight-color);
    font-weight: 600;
}

.wrapper {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.wrapper-heading {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 60px;
    color: var(--primary-color);
    line-height: 1;
    position: relative;
    text-align: left;
    display: inline-block;
    font-weight: 700;
}

/* ==========================================================================
   2. Base Card Style (with glowing border effect)
   ========================================================================== */
.card-base {
    background: rgba(34, 37, 45, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all var(--transition-speed) ease;
    overflow: hidden;
    position: relative;
}

.card-base::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: conic-gradient(from 180deg at 50% 50%, rgba(var(--primary-rgb), 0.8) 0deg, rgba(var(--accent-blue), 0.7) 180deg, rgba(var(--primary-rgb), 0.8) 360deg) 1;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    animation: rotate 4s linear infinite;
}

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

.card-base:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.2);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. Preloader & Main Layout
   ========================================================================== */
#preloader{width:100%;height:100vh;overflow:hidden;position:fixed;z-index:99999999;display:flex}#preloader::before,#preloader::after{position:absolute;content:"";width:100%;height:50%;background:#111;top:0;left:0;transition:.4s}#preloader::after{top:auto;bottom:0}#preloader.loaded::before,#preloader.loaded::after{height:0%}.scroll-static{position:relative;width:50%;height:1px;overflow:hidden;margin:auto;transition:all .8s;z-index:555}.scroll-static::before{position:absolute;content:"";width:0;height:100%;left:50%;background:#666;animation:showLine 700ms ease-in-out 0s forwards;transform:translateX(-50%)}@keyframes showLine{0%{width:0;opacity:0}100%{width:100%;opacity:1}}.scroll-static::after{position:absolute;content:"";width:100%;height:100%;left:-100px;top:0;animation:scroll-static 2s cubic-bezier(.86,0,.07,1) infinite;animation-delay:1200ms}@keyframes scroll-static{0%{left:-100%;background:#fff}100%{left:100%;background:#fff}}.scroll-static.loaded{width:100%;opacity:0}.scroll-static.loaded::after{opacity:0}

.main-content {
    width: calc(100% - 270px);
    float: right;
    position: relative;
    transition: all .3s cubic-bezier(0.9, 0, 0.2, 1);
}
.main-content .container-fluid {
    padding: 0 40px;
}

/* ==========================================================================
   4. Navigation Bar (Redesigned Active/Hover State)
   ========================================================================== */
.nav-bar {
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	width: 270px;
	background: #000;
	z-index: 1000;
	padding: 60px 15px 40px 40px;
	overflow-y: auto;
	transition: all .3s;
}
.scroll-indicator {
	position: absolute;
	height: 0%;
	width: 2px;
	background-color: var(--primary-color);
	top: 0;
	right: 0;
}
nav ul li { margin-bottom: 8px; }
nav ul li a {
	color: #888;
	position: relative;
	font-size: 17px;
    font-weight: 500;
	user-select: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: color var(--transition-speed) ease;
}
nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-light);
    border-radius: 20px;
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    z-index: -1;
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.2s ease;
}
nav ul li a:hover {
	color: var(--text-primary);
}
nav ul li a:hover::before {
    transform: scaleX(1);
    opacity: 1;
}
nav ul li a.active {
	color: var(--background-dark);
    font-weight: 600;
    pointer-events: none;
}
nav ul li a.active::before {
    background-color: var(--primary-color);
    transform: scaleX(1);
    opacity: 1;
}

/* ==========================================================================
   5. Header (Redesigned)
   ========================================================================== */
header {
	background: transparent;
	padding: 30px 0;
	position: absolute;
	top: 0;
	z-index: 999;
	width: 100%;
    transition: all var(--transition-speed) ease;
}
header.fixed {
	max-width: calc(100% - 270px);
	position: fixed;
	background: rgba(17, 19, 24, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
	padding: 15px 0;
	top: 0;
    margin-top: 0;
}
.logo a {
	font-size: 1.2rem;
    font-weight: 600;
	color: var(--primary-color);
	line-height: 40px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
    transition: all var(--transition-speed) ease;
}
.logo a:hover {
	opacity: .8;
    letter-spacing: 1.5px;
}
.service-btn {
    padding: 10px 20px;
    background-image: linear-gradient(90deg, var(--accent-blue), var(--primary-color));
    color: #fff;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    margin-left: 10px;
    float: right;
}
.service-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    color: #fff;
}
.menu-btn {
	position: absolute;
	height: 40px;
	width: 40px;
	line-height: 40px;
	background: var(--primary-color);
	color: #000;
	right: 15px;
	cursor: pointer;
	padding: 0;
	text-align: center;
	transition: .3s;
	display: none;
    border-radius: 5px;
}
.menu-btn:hover { color: #fff; }

/* ==========================================================================
   6. Hero & About Sections
   ========================================================================== */
@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.home-wrapper {
	padding: 120px 0;
	margin-top: 100px;
	border-top: 1px solid var(--border-color);
}
.home-wrapper .hero-img {
    animation: floatAnimation 6s ease-in-out infinite;
}
.hero-content {
	padding-left: 30px;
}
.hero-content .intro-name {
	font-size: clamp(2.5rem, 8vw, 4rem);
	font-weight: 700;
	margin-bottom: 20px;
	line-height: 1.2;
}
.hero-content .intro-name span:first-child {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.6);
}
.hero-content .intro-name span:last-child {
    background: linear-gradient(90deg, var(--accent-blue), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content p span {
	font-size: 1.1rem;
	position: relative;
	padding-left: 45px;
    font-weight: 400;
}
.hero-content p span::after {
	position: absolute; content: ""; height: 2px;
	width: 30px; left: 0; top: 50%;
    transform: translateY(-50%);
	background: var(--primary-color);
}

.about-text {
	margin: 20px 0 30px;
}

/* START: Social Links Improvement */
.social-links {
    margin-top: 40px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.social-links span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 10px;
}
.social-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.social-links li a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-speed) ease-in-out;
    background-color: var(--background-light);
}
.social-links li a:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
    border-color: var(--primary-color);
}
.social-links li a i {
    transition: transform var(--transition-speed) ease;
}
.social-links li a:hover i {
    transform: rotate(-10deg);
}
/* END: Social Links Improvement */

/* ==========================================================================
   7. Timeline Sections (Experience & Education)
   ========================================================================== */
.experience-timeline, .education-timeline {
    position: relative; padding: 20px 0; margin-top: 20px;
    border-left: 4px solid var(--background-light);
}
.experience-timeline::before, .education-timeline::before {
    content: ''; position: absolute; left: -4px; top: 0;
    width: 4px; height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    animation: fill-line 4s ease-out forwards;
}
@keyframes fill-line { from { height: 0%; } to { height: 100%; } }

.timeline-item { position: relative; margin-bottom: 40px; padding-left: 40px; }
.timeline-dot {
    position: absolute; left: -12px; top: 5px; height: 20px;
    width: 20px; background: var(--primary-color);
    border: 4px solid var(--background-dark); border-radius: 50%;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.7);
}
.timeline-item:hover .timeline-dot { transform: scale(1.3); background: var(--secondary-color); }
.timeline-content, .edu-timeline-content {
    background: rgba(34, 37, 45, 0.5); border-radius: 8px;
    padding: 20px; border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}
.timeline-item:hover .timeline-content,
.timeline-item:hover .edu-timeline-content {
    transform: translateX(10px);
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}
.timeline-content h4, .edu-course-name { font-size: 1.25rem; color: var(--secondary-color); margin-bottom: 5px; }
.timeline-content .position-name, .edu-institute { font-size: 1rem; color: var(--primary-color); margin-bottom: 10px; font-weight: 500; }
.timeline-content .mute-text, .edu-details { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.timeline-content ul { padding-left: 20px; list-style-type: '✔ '; color: var(--text-secondary); }

/* ==========================================================================
   8. Skills Section
   ========================================================================== */
.skills-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 40px; margin-bottom: 50px;
}
.skill-category h4 {
    font-size: 1.4rem; color: var(--secondary-color); margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border-color);
}
.skills-list { display: flex; flex-wrap: wrap; gap: 12px; }
.skills-list span {
    background: var(--background-light); color: var(--text-secondary);
    padding: 8px 18px; border-radius: 20px; font-size: 0.9rem;
    font-weight: 500; border: 1px solid transparent;
    transition: all var(--transition-speed) ease;
}
.skills-list span:hover {
    color: var(--primary-color); border-color: var(--primary-color);
    transform: translateY(-2px); box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

.skills-slider {
    position: relative; width: 100%; height: 120px; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.slider-track {
    display: flex; width: calc(200px * 22);
    animation: scroll-infinite 40s linear infinite;
}
.slider-track img {
    height: 60px; width: auto; margin: 0 40px; flex-shrink: 0;
    transition: transform 0.3s ease; filter: grayscale(80%); opacity: 0.7;
}
.slider-track:hover { animation-play-state: paused; }
.slider-track img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.15); }
@keyframes scroll-infinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 11)); }
}

/* ==========================================================================
   9. Certifications & Hobbies (Card-based sections)
   ========================================================================== */
.certifications-grid, .hobbies-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.cert-card, .hobby-card {
    background: var(--background-light); border-radius: 10px; padding: 25px;
    text-align: center; transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}
.cert-card:hover, .hobby-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-color);
}
.cert-card i, .hobby-card i {
    font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}
.cert-card h4, .hobby-card h4 { font-size: 1.1rem; color: var(--secondary-color); margin-bottom: 10px; }
.cert-card p, .hobby-card p { font-size: 0.9rem; color: var(--text-secondary); }
.cert-card .cert-date { font-size: 0.8rem; color: #888; margin-top: 15px; }


/* Publications Section */

/* Publications Section */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.publication-card {
    position: relative;
    background: var(--background-light);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.publication-content {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.pub-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.pub-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.pub-meta span {
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb), 0.1);
}

.pub-abstract {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pub-links {
    display: flex;
    gap: 15px;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--background-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pub-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.4);
    color: var(--background-dark);
}

.publication-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), transparent);
    opacity: 0;
    transition: all 0.4s ease;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.publication-card:hover .publication-overlay {
    opacity: 1;
}

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

/* ==========================================================================
   10. Achievements Section (Flip Card)
   ========================================================================== */
.achievements-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.achievement-card { position: relative; width: 100%; height: 280px; perspective: 1200px; }
.achievement-front, .achievement-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 10px; padding: 25px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.achievement-front {
    background: var(--background-light); border: 1px solid var(--border-color);
    color: var(--secondary-color); transform: rotateY(0deg);
}
.achievement-front i { font-size: 2.5rem; margin-bottom: 15px; color: var(--primary-color); }
.achievement-front h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.achievement-front .position { font-size: 1.1rem; font-weight: 500; color: var(--text-primary); margin-bottom: 10px; }
.achievement-front .institute { font-size: 0.9rem; color: var(--text-secondary); font-style: italic; }
.achievement-back {
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-color));
    color: var(--background-dark); transform: rotateY(180deg);
}
.achievement-back p { font-size: 0.9rem; line-height: 1.6; color: #fff; }
.btn-view {
    margin-top: 15px; padding: 8px 15px; text-decoration: none;
    background: rgba(0,0,0,0.8); color: #fff; font-size: 14px;
    font-weight: bold; border-radius: 5px; transition: background 0.3s ease;
}
.btn-view:hover { background: #000; }
.achievement-card:hover .achievement-front { transform: rotateY(-180deg); }
.achievement-card:hover .achievement-back { transform: rotateY(0deg); }


/* ==========================================================================
   11. Contact & Footer
   ========================================================================== */
.contact-wrapper p b { color: var(--text-primary); }
.contact-info p {
	position: relative; padding-left: 30px; margin-bottom: 10px;
    font-size: 1rem;
}
.contact-info p span {
	color: var(--primary-color); font-size: 1.1rem; position: absolute;
	left: 0; top: 50%; transform: translateY(-50%);
}
.support-wrapper { padding-top: 0; border: none; }
.footer-wrapper { padding: 50px 0; }
.footer-social a {
	color: var(--text-secondary); padding: 0 12px; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px;
}
.footer-social a:hover { color: var(--primary-color); }
.footer-copyright { margin-top: 15px; font-size: 0.9rem; color: #888; }
.portfolio-link {
    font-size: 14px; color: var(--primary-color) !important; margin-top: 15px;
    display: inline-block; font-weight: 500; padding: 8px 15px;
    border-radius: 4px; background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}
.portfolio-link:hover {
    color: #fff !important; background: var(--primary-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   12. Responsive Design
   ========================================================================== */
@media (max-width: 991px) {
    .nav-bar { width: 250px; }
    .main-content, header.fixed { width: calc(100% - 250px); }
}

@media (max-width: 767px) {
    .main-content, header.fixed, body.noscroll header.fixed { width: 100%; max-width: 100%; }
    header.fixed { max-width: 100%; }
    .nav-bar { transform: translateX(-100%); left: 0; }
    .nav-bar.show { transform: translateX(0); }
    .menu-btn { display: block; }
    .hero-content { text-align: center; margin-top: 40px; }
    .hero-content p span { padding-left: 0; justify-content: center; }
    .hero-content p span::after { display: none; }
    .wrapper { padding: 80px 20px; }
    .wrapper-heading { text-align: center; display: block; }
    .skills-grid { grid-template-columns: 1fr; }
    .timeline-item { padding-left: 30px; }
    .achievements-grid { gap: 50px; }
}

@media (max-width: 576px) {
    .wrapper { padding: 60px 15px; }
    .service-btn { margin-left: 5px; padding: 8px 15px; font-size: 14px; }
    .hobbies-grid, .certifications-grid, .achievements-grid { grid-template-columns: 1fr; }
}