/* Main CSS - Anvi Panchal Portfolio (Modern Elegant Edition) */

/* --------------------------------------------------
   VARIABLES & THEME
-------------------------------------------------- */
:root {
    /* Colors - Clean Neutral + Sky Blue + Pink Accent */
    --color-bg-body: #FAFBFE;
    --color-bg-card: #FFFFFF;
    --color-bg-section: #F4F7FB;

    --color-text-primary: #1E293B;
    --color-text-secondary: #64748B;
    --color-text-tertiary: #94A3B8;

    --color-accent: #E0618A;
    /* Pink — accent only */
    --color-accent-hover: #CF4D76;
    --color-accent-subtle: #FFF1F5;

    --color-blue: #5BA4D9;
    /* Sky Blue — secondary */
    --color-blue-light: #E8F4FD;
    --color-blue-hover: #4A93C8;

    --color-border: #E2E8F0;
    --color-border-hover: #CBD5E1;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 30px rgba(91, 164, 217, 0.10), 0 4px 12px rgba(0, 0, 0, 0.04);

    /* Decoration */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-full: 9999px;
}

/* --------------------------------------------------
   RESET & BASE
-------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-body);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

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

ul {
    list-style: none;
}

/* --------------------------------------------------
   UTILITIES
-------------------------------------------------- */
.container {
    width: 90%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* Buttons - Modern Dual-Tone Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--color-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(91, 164, 217, 0.25);
}

.btn-primary:hover {
    background: var(--color-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 164, 217, 0.30);
}

.btn-secondary {
    background-color: white;
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
    background-color: var(--color-blue-light);
    transform: translateY(-1px);
}

.btn-link {
    padding: 0;
    color: var(--color-blue);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-bottom: 1.5px dashed var(--color-blue);
    border-radius: 0;
}

.btn-link:hover {
    border-bottom-style: solid;
    color: var(--color-blue-hover);
}

/* --------------------------------------------------
   COMPONENTS
-------------------------------------------------- */

/* Navigation - Sleek Floating Bar */
.navbar {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin-bottom: var(--spacing-lg);
}

.nav-container {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0.65rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
}

.logo::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-left: 1px;
    vertical-align: super;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-family: var(--font-body);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-blue);
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
}

.menu-toggle {
    display: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text-primary);
}

/* Resume Download Button */
.nav-resume-btn {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    background: var(--color-text-primary);
    color: white !important;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    white-space: nowrap;
    line-height: 1;
}

.nav-resume-btn:hover {
    background: var(--color-blue);
    box-shadow: 0 4px 14px rgba(91, 164, 217, 0.30);
    transform: translateY(-1px);
}

.nav-resume-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Cards - Clean Modern Style */
.card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Top accent stripe on hover — blue to pink gradient */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card:hover::after {
    opacity: 1;
}

/* --------------------------------------------------
   SECTIONS & HERO
-------------------------------------------------- */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-accent));
    border-radius: 2px;
    margin-top: 0.5rem;
}

.text-center .section-title::after,
.section-title.text-center::after {
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   HERO — Split Layout (Completely Redesigned)
============================================= */
.hero {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
}

/* The container inside hero — horizontal split layout */
.hero>.container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    max-width: 1100px;
}

/* Left side text block */
.hero-text {
    flex: 1;
    z-index: 1;
}

/* Decorative background shapes */
.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(91, 164, 217, 0.08), rgba(224, 97, 138, 0.06));
    z-index: 0;
    filter: blur(40px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(91, 164, 217, 0.05);
    z-index: 0;
    filter: blur(30px);
}

/* Profile Image — Positioned on the right with decorative frame */
.hero-profile-container {
    position: relative;
    flex-shrink: 0;
    width: 360px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Decorative blob shape behind profile image */
.hero-profile-container::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 380px;
    height: 440px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: linear-gradient(135deg, var(--color-blue-light), rgba(224, 97, 138, 0.10));
    z-index: -1;
    animation: blobMorph 8s ease-in-out infinite;
}

@keyframes blobMorph {

    0%,
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    25% {
        border-radius: 50% 50% 40% 60% / 55% 40% 60% 45%;
    }

    50% {
        border-radius: 60% 40% 50% 50% / 45% 60% 40% 55%;
    }

    75% {
        border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
    }
}

/* Small decorative dot accents */
.hero-profile-container::after {
    content: '';
    position: absolute;
    top: 10px;
    left: -15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.5;
    box-shadow:
        30px -25px 0 4px rgba(91, 164, 217, 0.3),
        -10px 60px 0 3px rgba(224, 97, 138, 0.25),
        50px 80px 0 5px rgba(91, 164, 217, 0.2);
}

.hero-profile-img {
    width: 340px;
    height: 400px;
    object-fit: cover;
    border-radius: 30% 70% 60% 40% / 50% 40% 60% 50%;
    border: 4px solid white;
    box-shadow: 0 20px 50px -10px rgba(91, 164, 217, 0.20),
        0 10px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.5s ease;
    z-index: 1;
}

.hero-profile-img:hover {
    border-radius: 50% 50% 50% 50%;
    transform: scale(1.02);
    box-shadow: 0 25px 60px -10px rgba(91, 164, 217, 0.25),
        0 12px 24px rgba(0, 0, 0, 0.06);
}

/* Hero Text Content — Left side */
.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: var(--color-text-primary);
    text-transform: none;
}

/* Pink accent on the first name */
.hero-title span,
.hero-title em {
    color: var(--color-accent);
    font-style: normal;
}

.hero-role {
    font-family: var(--font-body);
    color: var(--color-blue);
    font-size: 1.05rem;
    margin-bottom: var(--spacing-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.2rem;
    background: var(--color-blue-light);
    border: 1px solid rgba(91, 164, 217, 0.20);
    border-radius: var(--radius-full);
    font-weight: 500;
    box-shadow: none;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 0 var(--spacing-lg);
    font-weight: 400;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--color-blue);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Home About Section */
.home-about {
    background: var(--color-bg-section);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.home-about-text {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

.achievement-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue-light);
    border-radius: var(--radius-md);
}

.achievement-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.achievement-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Certifications - Clean Accordion Style */
details {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

details:hover {
    border-color: var(--color-border-hover);
}

details[open] {
    border-color: var(--color-blue);
    border-left: 3px solid var(--color-blue);
    box-shadow: var(--shadow-sm);
}

summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    list-style: none;
    font-family: var(--font-heading);
    position: relative;
    padding-right: 3.5rem;
}

summary::-webkit-details-marker {
    display: none;
}

/* Custom Expand/Collapse Marker */
summary::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-blue);
    transition: transform 0.25s ease, color 0.25s ease;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
}

details:hover summary::after {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
    content: '+';
    font-size: 1.6rem;
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.cert-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.cert-logo-placeholder {
    width: 42px;
    height: 42px;
    font-family: var(--font-body);
    font-size: 0.65rem;
    background: var(--color-blue-light);
    border: 1px solid rgba(91, 164, 217, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.cert-meta {
    display: flex;
    flex-direction: column;
}

.cert-title {
    font-size: 1rem;
    font-weight: 600;
}

.cert-issuer {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

.cert-content {
    padding: 0 1.25rem 1.5rem;
    border-top: 1px dashed var(--color-border);
    margin-top: 0;
}

.cert-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: var(--color-bg-section);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    border: 1px solid var(--color-border);
}

.cert-detail-item strong {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

/* Card Icon Links (GitHub, Lab Report etc.) */
.card-icons {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.card-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: var(--radius-sm);
    color: var(--color-text-tertiary);
    transition: all 0.25s ease;
    background: var(--color-bg-section);
    border: 1px solid var(--color-border);
    overflow: hidden;
    flex-shrink: 0;
}

.card-icon-link:hover {
    color: var(--color-blue);
    border-color: var(--color-blue);
    background: var(--color-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(91, 164, 217, 0.15);
}

.card-icon-link svg {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    background: var(--color-bg-section);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
    .navbar {
        top: 0;
        margin-bottom: 1.5rem;
        border-radius: 0;
    }

    .nav-container {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--color-border);
        padding: 0.85rem 1rem;
        background: rgba(255, 255, 255, 0.96);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero stacks vertically on mobile */
    .hero {
        padding: 3rem 0 4rem;
        min-height: auto;
    }

    .hero>.container {
        flex-direction: column;
        text-align: center;
    }

    .hero-profile-container {
        order: -1;
        width: 220px;
        height: 260px;
        margin-bottom: 2rem;
    }

    .hero-profile-container::before {
        width: 240px;
        height: 280px;
        top: -10px;
        right: -10px;
    }

    .hero-profile-img {
        width: 200px;
        height: 240px;
    }

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

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .section-title::after {
        margin-left: 0;
    }
}