/* ============================================
   PORTFOLIO STYLES - PROFESSIONAL THEME
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

/* ============================================
   COLOR THEMES
   ============================================ */

/* Light Mode Variables */
html[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f2f5;
    --text-primary: #0a0e27;
    --text-secondary: #1a1f35;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --accent-light: #60a5fa;
    --accent-dark: #1d4ed8;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --success: #10b981;
}

/* Dark Mode Variables (default) */
:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #2563eb;
    --accent-light: #60a5fa;
    --accent-dark: #1d4ed8;
    --card-bg: #111827;
    --card-border: #1e293b;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(96, 165, 250, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(96, 165, 250, 0.6);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;

    padding: 18px 10%;

    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

html[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--accent-light);
    transition: all 0.3s ease;
    min-width: fit-content;
}

.logo:hover {
    transform: scale(1.1);
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-light);
    background: rgba(96, 165, 250, 0.1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: calc(100% - 28px);
}

.theme-toggle {
    background: rgba(96, 165, 250, 0.1);
    border: 2px solid var(--accent-light);
    color: var(--accent-light);
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--accent-light);
    color: var(--bg-primary);
    transform: rotate(20deg);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 10%;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    animation: slideInUp 1s ease-out;
    gap: 60px;
}

.hero-text {
    max-width: 600px;
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.intro {
    color: var(--accent-light);
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 600;
}

.summary {
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.primary:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

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

.secondary:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.hero-image img {
    width: 380px;
    height: 380px;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid var(--accent-light);
    box-shadow: 0 20px 60px rgba(96, 165, 250, 0.3);
    transition: all 0.3s ease;
}

.hero-image img:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 30px 80px rgba(96, 165, 250, 0.4);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 100px 10%;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
    scroll-margin-top: 90px;
}

.dark-section {
    background: var(--bg-secondary);
}

.section-title {
    margin-bottom: 60px;
    text-align: center;
}

.section-title p {
    color: var(--accent-light);
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -1px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    animation: fadeIn 0.8s ease-out;
}

.about-grid > div:first-child p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-light);
}

.info-card h3 {
    color: var(--accent-light);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.8s ease-out;
}

.timeline-item {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--accent-light);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-light), var(--accent));
    border-radius: 12px 0 0 12px;
}

.timeline-item:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.15);
}

.timeline-item h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 700;
}

.timeline-item span {
    color: var(--accent-light);
    display: block;
    margin-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 600;
}

.timeline-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.timeline-logo img {
    width: 72%;
    height: 72%;
    object-fit: contain;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

/* ============================================
   STATS/HIGHLIGHTS SECTION
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    animation: fadeIn 0.8s ease-out;
}

.stat-card {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
    animation: scaleUp 0.6s ease-out backwards;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.3s;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.95;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    animation: fadeIn 0.8s ease-out;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.2);
    border-color: var(--accent-light);
}

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay {
    opacity: 1;
}

.project-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid white;
    color: white;
    cursor: pointer;
    display: inline-block;
}

.github-btn {
    background: rgba(255, 255, 255, 0.2);
}

.github-btn:hover {
    background: white;
    color: var(--accent);
}

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

.demo-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.disabled-btn {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.78);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.45);
}

.project-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
    flex: 1;
    font-size: 0.95rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.tags span {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.tags span:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    animation: fadeIn 0.8s ease-out;
}

.skill-group {
    background: var(--card-bg);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.skill-group:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-light);
}

.skill-group h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 18px;
    font-weight: 700;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-box {
    background: var(--bg-tertiary);
    padding: 8px 14px;
    text-align: center;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.skill-box:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    border-color: var(--accent);
}

/* ============================================
   EDUCATION SECTION
   ============================================ */

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.8s ease-out;
}

.education-item .education-specialization {
    color: var(--text-muted);
    font-weight: 600;
    margin: 10px 0 12px;
    font-size: 0.95rem;
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    animation: fadeIn 0.8s ease-out;
}

.cert-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    text-align: center;
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-light);
}

.cert-media {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.cert-media img,
.cert-media object {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-file {
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
}

.cert-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.cert-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.cert-issuer {
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

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

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    margin-bottom: 50px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-light);
    font-weight: 700;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    font-size: 1rem;
}

html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea {
    background: white;
    border-color: #e5e7eb;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background: var(--bg-primary);
}

html[data-theme="light"] .form-group input:focus,
html[data-theme="light"] .form-group textarea:focus {
    background: white;
}

.contact-form button {
    width: 100%;
    margin-top: 10px;
}

.success-message {
    background: linear-gradient(135deg, var(--success), #34d399);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    color: white;
    animation: slideInUp 0.5s ease-out;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 32px;
    height: 32px;
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.success-message p {
    font-size: 0.95rem;
    opacity: 0.95;
}

.contact-cards {
    margin-top: 50px;
}

.contact-cards h3 {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.3rem;
    font-weight: 700;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.contact-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.2);
    border-color: var(--accent-light);
}

.contact-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-icon svg {
    width: 28px;
    height: 28px;
}

.contact-card h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 700;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-secondary);
    padding: 60px 10% 40px;
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-light);
    margin-left: 8px;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.footer-bottom p:first-child {
    font-weight: 600;
}

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

@media (max-width: 1200px) {
    .section {
        padding: 80px 5%;
    }

    .navbar {
        padding: 15px 5%;
    }

    .hero {
        padding: 100px 5%;
    }

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

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

    .timeline-item {
        flex-direction: column;
        gap: 16px;
    }

    .timeline-logo {
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        padding: 12px 5%;
        gap: 15px;
    }

    .nav-links {
        order: 3;
        flex: 0 0 100%;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        padding: 4px 0 2px;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        padding: 10px 12px;
        border-radius: 8px;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        padding: 80px 5%;
    }

    .hero h1 {
        font-size: 3rem;
    }

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

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

    .hero-image img {
        width: 280px;
        height: 280px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .section-title h2 {
        font-size: 2.2rem;
    }

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

    .education-timeline::before {
        display: none;
    }

    .education-item,
    .education-item:nth-child(2) {
        margin-left: 0;
        flex-direction: row;
    }

    .education-marker {
        display: none;
    }

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

    .contact-cards {
        margin-top: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 12px 4%;
        gap: 10px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .hero {
        padding: 60px 4%;
    }

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

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

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

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

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

    .section {
        padding: 60px 4%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .skill-group {
        padding: 22px;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

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

    .stat-number {
        font-size: 2.2rem;
    }

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

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

    .theme-toggle {
        font-size: 1rem;
    }

    .intro {
        font-size: 0.8rem;
    }

    .contact-form {
        padding: 25px;
    }

    .footer-content {
        gap: 20px;
    }

    .footer {
        padding: 40px 4%;
    }
}
