/* ==================== CSS VARIABLES ==================== */
:root {
    /* Light Mode Colors */
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
    --border-color: #e5e7eb;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-code: 'Fira Code', monospace;
    
    /* Spacing */
    --section-padding: 100px 20px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #22d3ee;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --border-color: #334155;
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

li {
  line-height: 1.8;
text-align: justify;
}


.cert-badge {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-badge iframe {
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.timeline-content h3,
.timeline-content h4 {
  color: #60a5fa; /* matches blue accent */
}

.timeline-date i,
.cert-date i {
  color: var(--accent-color);
  margin-right: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

::selection {
    background: var(--primary-color);
    color: white;
}

/* ==================== NAVIGATION ==================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
    transition: var(--transition);
}

nav.scrolled {
    padding: 15px 0;
    box-shadow: 0 4px 20px var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(180deg);
    border-color: var(--primary-color);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    top: -250px;
    right: -250px;
    animation: float 20s infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    opacity: 0.1;
    bottom: -200px;
    left: -200px;
    animation: float 15s infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    padding: 0 20px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-container {
    font-size: clamp(20px, 4vw, 32px);
    color: var(--text-secondary);
    margin-bottom: 30px;
    min-height: 50px;
    font-family: var(--font-code);
}

.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-down i {
    font-size: 30px;
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* ==================== SECTION STYLES ==================== */
section {
    padding: var(--section-padding);
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ==================== ABOUT SECTION ==================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.profile-card {
    position: relative;
    text-align: center;
}

.profile-image {
  width: 300px; /* adjust width as needed */
  height: 380px; /* rectangular aspect ratio */
  background: var(--bg-card);
  padding: 0;
  margin: 0 auto 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-radius: 15px; /* Optional: rounded corners; remove for sharp rectangle */
  box-shadow: 0 4px 20px var(--shadow);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  border-radius: 15px; /* Match the container's border-radius */
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
    text-align: justify;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.skill-category {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px var(--shadow-hover);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category i {
    font-size: 24px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--border-color);
}

/* ==================== PROJECTS SECTION ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.project-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image i {
    font-size: 60px;
    color: white;
    opacity: 0.9;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay .btn {
    padding: 10px 20px;
    font-size: 14px;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: justify;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badge {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* ==================== EXPERIENCE SECTION ==================== */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
}

.timeline-item::before {
    content: '\f0b1'; /* briefcase icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900; /* solid icon */
    position: absolute;
    left: 50%;
    top: 20px; /* Adjust vertical alignment */
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    transition: var(--transition);
}

.timeline-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 22px;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-date {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.timeline-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ==================== CONTACT SECTION ==================== */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 15px var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    transform: scale(1.2) translateY(-5px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--bg-secondary);
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    margin: 0 auto;
}

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--shadow);
    z-index: 999;
    justify-content: center;
    align-items: center;
    display: flex; 
}

.send-msg{
    align-items: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px var(--shadow-hover);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 84px; /* Adjust based on nav height */
        right: -100%;
        width: 280px;
        height: calc(100vh - 84px);
        background: var(--bg-card);
        flex-direction: column;
        padding: 40px 20px;
        box-shadow: -5px 0 15px var(--shadow);
        transition: var(--transition);
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu {
        display: block;
    }

    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-left: 40px;
        margin-bottom: 30px;
    }
    
    .timeline-item .timeline-content{
        grid-column: 1 !important;
    }

    .timeline-item::before {
        left: 20px;
    }
}

@media (max-width: 640px) {
    :root {
        --section-padding: 60px 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 25px;
    }
}

.project-links {
  display: flex;
  justify-content: flex-start;
}

.project-links .btn {
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
}

/* ==================== CERTIFICATIONS SECTION ==================== */
.certifications-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  justify-items: center;
}

.cert-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow);
  text-align: center;
  transition: var(--transition);
  width: 100%;
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px var(--shadow-hover);
}

.cert-card h3 {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 8px;
}

.cert-card h4 {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 10px;
}

.cert-date {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 15px;
}


.coursera-badge
{
    width: 150px;
        height: auto;
        object-fit: contain;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0,212,255,0.25);
        background-color: rgba(255,255,255,0.05);
        padding: 10px;
      "
}