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

:root {
    /* modern palette: soft off-white, deep charcoal text, indigo primary, cyan accent */
    --color-bg: #f5f7fa;
    --color-text: #2e3a59;
    --color-primary: #5b21b6;
    --color-primary-dark: #4c1d95;
    --color-accent: #22d3ee;
    --color-muted: #6b7280;
    --color-nav-bg: rgba(255,255,255,0.9);
    --font-sans: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* NAVIGATION */
nav {
    width: 100%;
    background: var(--color-nav-bg);
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

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

/* Logo */
nav .logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    text-decoration: none;
}

/* Desktop Menu */
nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--color-primary-dark);
}

/* HAMBURGER */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

/* Animate into X */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* MOBILE */
@media (max-width: 768px) {

    .nav-toggle {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--color-nav-bg);
        overflow: hidden;

        max-height: 0;
        transition: max-height 0.4s ease;
    }

    nav ul li {
        text-align: center;
        padding: 1rem 0;
    }

    nav ul.active {
        max-height: 500px;
    }
}

/* HERO SECTION */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px; /* account for fixed nav */
    background: linear-gradient(145deg, var(--color-primary), var(--color-accent));
    color: white;
}

.hero-content h1 {
    color: white;
}
.hero-content p {
    color: #f1f5f9;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    padding: 12px 28px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50px;
}

.hero .btn:hover {
    background: #2563eb;
}

/* MAIN SECTIONS */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 100px auto 60px;
    padding-bottom: 40px;
}

/* fade-in for sections */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #111;
}

.container p, .container ul {
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
}

.container ul {
    list-style: disc outside;
    margin-left: 2rem;
    padding-left: 0;
}

/* Skills section - grid badges */
.skills-section h2 {
    margin-bottom: 18px;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
    gap: 20px;
    justify-items: center;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 12px;
}
/* skills-row wrapper not used with single row but kept for compatibility */
.skills-row {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
}
.skills-row .skill-badge {
    min-width: 160px;
    text-align: center;
    flex: 0 0 auto;
}
.skill-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    /* remove manual margins when using grid layout */
    margin: 0;
    box-shadow: 0 6px 18px rgba(59,130,246,0.14);
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    max-width: 180px;
    text-align: center;
}
.skill-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(59,130,246,0.2);
}

/* EXPERTISE POINTS - TYPEWRITER ANIMATION */
.expertise-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.expertise-point {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    border: 2px solid #3b82f6;
    animation: typewriter 1.2s steps(40, end) forwards, fadeInFloat 1.5s ease-in-out forwards;
    opacity: 0;
}

@keyframes typewriter {
    0% {
        width: 0;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

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

.expertise-point:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-color: #1e3a8a;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* LOOPING TYPEWRITER EXPERTISE IN HERO */
.looping-expertise {
    height: 40px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* single rotating point styling */
#rotating-point {
    display: inline-block;
    padding: 8px 20px;
    /* background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); */
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    /* border: 2px solid #3b82f6; */
    opacity: 0; /* start hidden; JS will show */
}

#rotating-point.typewriter {
    animation: typewriter 0.8s steps(40,end) forwards;
    opacity: 1;
}

.looping-point {
    position: absolute;
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    border: 2px solid #3b82f6;
    animation: loopingTypewriter 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.looping-point:nth-child(1) { animation-delay: 0s; }
.looping-point:nth-child(2) { animation-delay: 3s; }
.looping-point:nth-child(3) { animation-delay: 6s; }
.looping-point:nth-child(4) { animation-delay: 9s; }
.looping-point:nth-child(5) { animation-delay: 12s; }
.looping-point:nth-child(6) { animation-delay: 15.5s; }

@keyframes loopingTypewriter {
    0% {
        width: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
        width: 0;
    }
    20% {
        opacity: 1;
        width: 100%;
    }
    80% {
        opacity: 1;
        width: 100%;
    }
    90% {
        opacity: 0;
        width: 100%;
    }
    100% {
        opacity: 0;
        width: 0;
    }
}

/* EXPERIENCE CARDS (simple) */
.cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.card .designation {
    font-weight: 600;
    color: #555;
}

.card .dates {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 12px;
}

/* PROJECTS SECTION */
.projects {
    margin-top: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 40px;
}

.project-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    display: block;
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.project-info p {
    font-size: 1rem;
    color: #444;
}

.project-card img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
}

.project-info h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #3b82f6;
}

.project-info p {
    font-size: 1rem;
    color: #444;
}

/* CONTACT SECTION */
#contact p {
    font-size: 1.1rem;
    text-align: center;
}

/* CERTIFICATES / BADGES */
.certificates h2 {
    margin-bottom: 18px;
}
.cert-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: center;
}
.cert-grid img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s;
}
.cert-grid img:hover {
    transform: scale(1.05);
}

/* certificate link layout */
.cert-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #111;
    border: 1px solid transparent;
}
.cert-link:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-color: #e5e7eb;
}
.cert-link span {
    font-weight: 600;
    color: #111;
}

#contact a {
    color: var(--color-primary);
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px 0;
    background: #f3f4f6;
    color: #555;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-content h1 {font-size: 2.8rem;}
    .hero-content p {font-size: 1.1rem;}
    .project-card {flex-direction: column;}
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 120px 20px 80px;
    text-align: center;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content .accent {
    color: #22d3ee;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: #3b82f6;
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #22d3ee;
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #6366f1;
    top: 20%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(20px) translateX(20px); }
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: 60px 0;
    background: #0f172a;
    color: #e2e8f0;
}

.projects h3 {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #38bdf8;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.7);
}

.project-card img {
    width: 100%;
    display: block;
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 10px;
    color: #22d3ee;
}

.project-info p {
    font-size: 0.95rem;
    color: #cbd5e1;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: rgba(51, 65, 85, 0.5);
    color: #cbd5e1;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #38bdf8;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
    color: white;
    border-color: #22d3ee;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: #38bdf8;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.skill-badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(34, 211, 238, 0.1) 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #22d3ee;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    min-height: 60px;
}

.skill-badge:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(34, 211, 238, 0.2) 100%);
    border-color: #22d3ee;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.2);
}

.skill-badge i {
    font-size: 1.2rem;
}

/* ===== EXPERIENCE CARDS ===== */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.7) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    padding: 24px;
    border-radius: 12px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(34, 211, 238, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
}

.card h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: #38bdf8;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.card:hover h4 {
    color: #22d3ee;
}

.card .designation {
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.card .dates {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card .dates::before {
    content: '📅';
}

.card .details {
    color: #cbd5e1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    line-height: 1.8;
}

.card .details ul {
    list-style: disc outside;
    margin: 0;
    padding-left: 1.2rem;
    text-align: left;
}

.card h4 {
    position: relative;
    cursor: pointer;
}
.card h4::after {
    content: " (click for more)";
    font-size: 0.85rem;
    color: #6b7280;
    opacity: 0;
    transition: opacity 0.2s;
}
.card:hover h4::after {
    opacity: 1;
}

.card.expanded h4::after {
    opacity: 0;
}

.card .details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.card.expanded .details {
    max-height: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    margin-top: 60px;
    border-top: 2px solid rgba(59, 130, 246, 0.3);
    color: #94a3b8;
}

footer p {
    font-size: 0.95rem;
}

/* ===== LINKS ===== */
a {
    color: #22d3ee;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    header {
        padding: 40px 20px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    header h2 {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .container {
        width: 95%;
        padding: 20px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    header h2 {
        font-size: 1rem;
    }

    header {
        padding: 30px 15px;
    }

    .contact-info {
        gap: 12px;
        flex-direction: column;
    }

    .contact-link,
    .phone {
        font-size: 0.9rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab-content h3 {
        font-size: 1.5rem;
    }

    .card {
        padding: 16px;
    }

    .card h4 {
        font-size: 1.2rem;
    }
}