/* ============================================
   GENERAL STYLES & ROOT VARIABLES
   ============================================ */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #f9fafb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

.hero-profile-photo {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.4);
    border: 6px solid var(--primary-color);
    object-fit: cover;
    aspect-ratio: 1/1;
    animation: float 3s ease-in-out infinite;
}

.avatar-placeholder {
    font-size: 15rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

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

/* ============================================
   SECTIONS GENERAL STYLES
   ============================================ */
section {
    padding: 80px 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

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

.profile-photo {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 4px solid var(--primary-color);
    object-fit: cover;
    transition: var(--transition);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.about-text p {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contact-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px;
    transition: var(--transition);
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
    width: 30px;
}

.info-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.info-item:hover a {
    color: var(--primary-color);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat {
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #f3f4f6 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
    background: linear-gradient(135deg, #f0f9ff 0%, #f9fafb 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-category:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: scale(1.05);
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.experience {
    background: var(--bg-white);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    margin-right: 50%;
    text-align: right;
    padding-right: 4rem;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 4rem;
}

.timeline-marker {
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--primary-color), var(--shadow-sm);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -42px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -42px;
}

.timeline-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-details {
    list-style: none;
    color: var(--text-light);
}

.timeline-details li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.timeline-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    background: linear-gradient(135deg, #f0f9ff 0%, #f9fafb 100%);
}

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

.project-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-10px);
}

.project-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: 6px;
}

.project-link:hover {
    background: var(--bg-light);
    transform: translateX(5px);
}

/* ============================================
   EDUCATION & CERTIFICATIONS SECTION
   ============================================ */
.education {
    background: var(--bg-white);
}

.edu-certs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.education-block,
.certification-block {
    background: linear-gradient(135deg, #f0f9ff 0%, #f9fafb 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.education-block h3,
.certification-block h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.edu-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.edu-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.edu-header h4 {
    color: var(--text-dark);
    font-size: 1.1rem;
}

.edu-year {
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.9rem;
}

.edu-institution {
    color: var(--text-light);
    font-size: 0.95rem;
}

.cert-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.cert-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cert-info h4 {
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.cert-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Certificate Gallery Styles */
.cert-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.cert-item-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-link {
    text-decoration: none;
    width: 100%;
}

.cert-image {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

.cert-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cert-link:hover .cert-image {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.cert-link:hover .cert-image::before {
    left: 100%;
}

.cert-image i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.cert-image p {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: linear-gradient(135deg, #f0f9ff 0%, #f9fafb 100%);
}

.contact-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.contact-method:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.method-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.method-info h4 {
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.method-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: scale(1.1) translateY(-5px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.footer i {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets (769px - 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-profile-photo {
        max-width: 300px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-photo {
        order: -1;
    }

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

    .edu-certs-grid {
        grid-template-columns: 1fr;
    }

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

    .timeline-item {
        padding: 0 0 0 80px;
        margin: 0 !important;
        text-align: left;
    }

    .timeline-marker {
        left: -2px !important;
    }

    .timeline-item:nth-child(odd) {
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: left;
        padding-right: 0 !important;
    }

    .timeline-item:nth-child(even) {
        margin-left: 0 !important;
        padding-left: 80px;
    }

    .timeline-item:nth-child(even) .timeline-marker {
        left: -2px;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
        box-shadow: var(--shadow-sm);
    }

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

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-toggle {
        display: flex;
    }

    /* Hero Section */
    section {
        padding: 50px 15px;
    }

    .hero {
        padding: 50px 15px;
        min-height: auto;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-profile-photo {
        max-width: 250px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    /* About Section */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-photo {
        max-width: 280px;
        margin: 0 auto;
    }

    .cert-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .cert-image {
        min-height: 180px;
        padding: 1.5rem 1rem;
    }

    .cert-image i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .cert-image p {
        font-size: 0.85rem;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Experience Timeline */
    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding: 0 0 2rem 60px;
        margin: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: left !important;
        padding-right: 0 !important;
        padding-left: 60px !important;
    }

    .timeline-marker {
        left: 5px !important;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Methods */
    .contact-methods {
        grid-template-columns: 1fr;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        gap: 1rem;
    }

    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Education Block */
    .education-block,
    .certification-block {
        padding: 1.5rem;
    }

    /* Info Items */
    .contact-info {
        gap: 0.8rem;
    }

    .info-item {
        padding: 5px;
    }
}

/* Extra Small Devices (max 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title::after {
        width: 40px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-container {
        padding: 0.8rem 15px;
    }

    .stat {
        padding: 1.5rem 1rem;
    }

    .stat h3 {
        font-size: 2rem;
    }

    .hero-profile-photo {
        max-width: 200px;
    }

    .profile-photo {
        max-width: 220px;
    }

    .cert-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cert-image {
        min-height: 160px;
        padding: 1.5rem 1rem;
    }

    .project-card {
        margin: 0;
    }

    .project-content {
        padding: 1.5rem;
    }

    .timeline-item {
        padding: 0 0 1.5rem 50px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 50px !important;
    }

    .timeline-marker {
        width: 16px;
        height: 16px;
        left: 2px !important;
    }

    .edu-header {
        flex-direction: column;
        gap: 0.3rem;
    }

    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    section {
        page-break-inside: avoid;
    }

    .navbar,
    .hero-buttons,
    .social-links {
        display: none;
    }
}
