/* 
  Section-specific styles - Navigation, Hero, About, Skills, Projects, Experience, Contact, Footer
*/

/* ========== Navigation ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-md) 0;
    background: transparent;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--glass-border);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.navbar__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width var(--transition-base);
}

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

.navbar__link:hover::after,
.navbar__link.active::after {
    width: 100%;
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Mobile menu toggle */
.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.navbar__toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

/* ========== Hero Section ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 6rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    z-index: -1;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xl);
}

.hero__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    max-width: 700px;
    width: 100%;
    padding: 0 var(--container-padding);
    box-sizing: border-box;
}

.hero__greeting {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
}

.hero__name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
}

.hero__title {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.hero__title-text {
    display: inline-block;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--accent);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

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

.hero__description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0;
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

.hero__social {
    margin-top: var(--space-xl);
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__photo {
    position: relative;
    width: 320px;
    height: 380px;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 8s ease-in-out infinite;
    box-shadow: inset 0 0 0 9px rgba(255, 255, 255, 0.3);
}

@keyframes morphing {

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

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

/* Decorative elements */
.hero__decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    z-index: -1;
}

.hero__decoration--1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 20%;
    right: 10%;
}

.hero__decoration--2 {
    width: 200px;
    height: 200px;
    background: #06b6d4;
    bottom: 20%;
    left: 5%;
}

/* ========== About Section ========== */
.about {
    /* Transparent - unified background */
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-3xl);
    align-items: start;
}

.about__content--no-image {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.about__image {
    position: relative;
}

.about__image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.about__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.about__description {
    font-size: 1.05rem;
    line-height: 1.8;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.about__stat {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.about__stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.about__stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--accent);
}

.about__stat-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.about__stat-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ========== Skills Section ========== */
.skills {
    /* Transparent - unified background */
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* ========== Projects Section ========== */
.projects {
    /* Transparent - unified background */
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

/* Center the final card when it is the only item in the last row */
@media (min-width: 769px) {
    .projects__grid>.feature-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        width: min(100%, 520px);
        justify-self: center;
    }
}

/* ========== Experience Section ========== */
.experience {
    /* Transparent - unified background */
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline__item {
    position: relative;
    padding-left: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline__content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.timeline__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.timeline__company {
    color: var(--accent);
    font-weight: 500;
}

.timeline__date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline__list {
    list-style: disc;
    padding-left: var(--space-lg);
}

.timeline__list li {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

/* ========== Certifications Section ========== */
.certifications {
    /* Transparent - unified background */
}

.certifications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
    justify-items: center;
}

.cert-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 100%;
    max-width: 450px;
    transition: all var(--transition-base);
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.cert-card__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.cert-card__icon svg {
    width: 30px;
    height: 30px;
}

.cert-card__content {
    flex: 1;
}

.cert-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.cert-card__issuer {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-md) 0;
}

.cert-card__link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ========== Contact Section ========== */
.contact {
    /* Transparent - unified background */
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-3xl);
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact__info-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.contact__cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact__card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.contact__card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(4px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}

.contact__card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-md);
}

.contact__card-icon svg {
    width: 22px;
    height: 22px;
}

.contact__card-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.contact__card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.contact__form-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact__form-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
}

.contact__form {
    display: flex;
    flex-direction: column;
}

/* ========== Footer ========== */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    padding: var(--space-xl) 0;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer__social {
    display: flex;
    gap: var(--space-md);
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__text {
        align-items: center;
        order: 2;
    }

    .hero__image {
        order: 1;
    }

    .hero__photo {
        width: 250px;
        height: 300px;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__social {
        justify-content: center;
    }

    .about__content {
        grid-template-columns: 1fr;
    }

    .about__image {
        max-width: 300px;
        margin: 0 auto;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: var(--space-3xl) 0;
    }

    .navbar__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: linear-gradient(180deg, var(--bg-primary) 0%, transparent 100%);
        padding: var(--space-lg) var(--container-padding) var(--space-2xl);
        gap: var(--space-md);
        align-items: center;
    }

    .navbar__menu.open {
        display: flex;
    }

    .navbar__toggle {
        display: flex;
    }

    .about__stats {
        grid-template-columns: 1fr;
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .hero__photo {
        width: 200px;
        height: 250px;
    }

    .timeline::before {
        left: 6px;
    }

    .timeline__dot {
        left: 0;
    }

    .footer__content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }

    .hero__name {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .cert-card {
        flex-direction: column;
        text-align: center;
    }

    .navbar__actions {
        gap: var(--space-sm);
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .navbar__toggle {
        padding: var(--space-xs);
    }

    .navbar__toggle span {
        width: 20px;
    }
}

@media (max-width: 320px) {
    :root {
        --container-padding: 0.75rem;
    }

    .navbar__logo {
        font-size: 1.25rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

    .navbar__toggle span {
        width: 18px;
    }

    .hero__name {
        font-size: 1.75rem;
    }

    .hero__greeting {
        font-size: 1rem;
    }
}
