/* ==============================
   BASE SETUP
   ============================== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --border: #222222;
    --radius: 12px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

/* Light Theme - Modern & Professional */
:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --accent: #4f46e5;
    --accent-light: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.1);
    --border: #e5e7eb;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(79, 70, 229, 0.15);
}

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

html {
    scroll-behavior: smooth;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100dvh; /* Safari iOS */
    min-height: -webkit-fill-available;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* ==============================
   TYPOGRAPHY
   ============================== */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

/* ==============================
   UTILITIES
   ============================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--text-primary);
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #128c7e;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-whatsapp:hover {
    background: #075e54;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

:root[data-theme="light"] .btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

:root[data-theme="light"] .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn:focus-visible,
.nav-logo:focus-visible,
.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.nav-toggle:focus-visible,
.language-option:focus-visible,
.github-link:focus-visible,
.project-detail-btn:focus-visible,
.modal-close:focus-visible,
.footer-links a:focus-visible,
.linkedin-badge:focus-visible,
.contact-item a:focus-visible {
    outline: 3px solid var(--accent-light);
    outline-offset: 4px;
}

/* ==============================
   NAVIGATION
   ============================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
}

:root[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-links a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

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

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

.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 4px;
    z-index: 101;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
}

.language-option {
    min-width: 34px;
    min-height: 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.language-option:hover,
.language-option.active {
    background: var(--accent);
    color: #ffffff;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

:root[data-theme="light"] .theme-toggle .fa-moon { display: none; }
:root[data-theme="light"] .theme-toggle .fa-sun { display: inline; }
:root:not([data-theme="light"]) .theme-toggle .fa-sun { display: none; }

/* ==============================
   SCROLL PROGRESS BAR
   ============================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 200;
    width: 0%;
    transition: width 0.1s ease;
}

/* ==============================
   HERO SECTION
   ============================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 60px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-name {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .hero-name {
    background: linear-gradient(135deg, #1a1a2e 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-light);
    margin-bottom: 20px;
    min-height: 2rem;
}

.typed-text {
    display: inline;
}

.cursor {
    display: inline-block;
    color: var(--accent);
    animation: blink 1s infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-socials {
    display: flex;
    gap: 24px;
}

.hero-socials a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-socials a:hover {
    color: var(--accent);
}

.hero-socials i {
    font-size: 1.1rem;
}

/* ==============================
   AVAILABILITY
   ============================== */
.availability {
    padding: 70px 60px;
    background: var(--bg-secondary);
}

.availability-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr auto;
    gap: 28px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.availability-copy .section-label {
    margin-bottom: 10px;
}

.availability-copy .section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 12px;
}

.availability-copy p {
    color: var(--text-secondary);
    max-width: 640px;
}

.availability-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.availability-card {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
}

.availability-card i {
    color: var(--accent);
    font-size: 1.2rem;
}

.availability-card span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.availability-cta {
    white-space: nowrap;
}

/* ==============================
   CERTIFICATIONS
   ============================== */
.certifications {
    padding: 100px 60px;
    background: var(--bg-secondary);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.cert-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 12px;
    flex-shrink: 0;
}

.cert-icon i {
    font-size: 1.5rem;
    color: var(--accent);
}

.cert-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cert-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cert-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* ==============================
   EXPERIENCE SECTION (same layout as About)
   ============================== */
.experience {
    padding: 100px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

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

/* Hero Visual */
.hero-visual {
    position: relative;
    flex-shrink: 0;
}

.hero-avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-avatar picture,
.project-thumb picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: 1;
}

:root[data-theme="light"] .hero-glow {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
}

:root[data-theme="light"] .hero-avatar {
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.2);
}

#particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 1;
    pointer-events: none;
}

/* ==============================
   ABOUT SECTION
   ============================== */
.about {
    padding: 100px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-display);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==============================
   TIMELINE (Experience)
   ============================== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.timeline-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 32px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-content .company {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==============================
   PROJECTS SECTION
   ============================== */
.projects {
    padding: 100px 60px;
    background: var(--bg-secondary);
}

:root[data-theme="light"] .projects {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.projects .section-header {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow);
}

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

.project-thumb {
    height: 200px;
    background: var(--bg-primary);
    overflow: hidden;
}

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

.project-card:hover .project-thumb img {
    transform: scale(1.05);
}

.project-info {
    padding: 28px;
}

.project-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-glow);
    color: var(--accent-light);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.project-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-highlights {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    padding-left: 0;
}

.project-highlights li {
    position: relative;
    padding-left: 18px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.project-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tech span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.project-detail-btn:hover {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
}

.github-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: scale(1.1);
}

/* ==============================
   SKILLS SECTION
   ============================== */
.skills {
    padding: 100px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 22px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    min-height: 190px;
}

.skill-category:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.skill-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-category h3 i {
    color: var(--accent);
    font-size: 1.2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.skill-tag {
    font-size: 0.85rem;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-tag--core {
    background: var(--accent-glow);
    border-color: rgba(129, 140, 248, 0.45);
    color: var(--text-primary);
}

.skill-tag:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

/* ==============================
   EDUCATION SECTION
   ============================== */
.education-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

:root[data-theme="light"] .education-card:hover {
    box-shadow: var(--shadow-hover);
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.edu-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

.edu-year {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.edu-school {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.edu-gpa {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 24px;
}

.edu-highlights {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-light);
}

.highlight-badge i {
    font-size: 0.9rem;
}

.edu-courses {
    text-align: left;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.edu-courses p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.edu-courses strong {
    color: var(--text-primary);
}

/* ==============================
   TESTIMONIALS
   ============================== */
.testimonials {
    padding: 100px 60px;
    background: var(--bg-secondary);
}

.testimonial-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.testimonial-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.testimonial-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.testimonial-card span {
    color: var(--accent-light);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ==============================
   CONTACT SECTION
   ============================== */
.contact {
    padding: 100px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-item i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.contact-item a,
.contact-item span {
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent);
}

.linkedin-cta {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.linkedin-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.linkedin-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #0a66c2;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(10, 102, 194, 0.3);
}

.linkedin-badge:hover {
    background: #004182;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 102, 194, 0.4);
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.contact-actions .btn {
    min-height: 48px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form input.invalid,
.contact-form textarea.invalid {
    border-color: #ef4444;
}

.form-status {
    min-height: 22px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-status.success {
    color: #10b981;
}

.form-status.error {
    color: #ef4444;
}

.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ==============================
   PROJECT MODAL
   ============================== */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 24px;
}

.project-modal[hidden] {
    display: none;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.project-modal-card {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: min(820px, 92vh);
    overflow: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

.modal-hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) 1fr;
    gap: 30px;
    padding: 34px;
}

.modal-hero img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.modal-summary {
    align-self: center;
}

.modal-summary h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 16px;
}

.modal-summary p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 34px 34px;
}

.modal-detail-grid section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px;
}

.modal-detail-grid section:last-child {
    grid-column: 1 / -1;
}

.modal-detail-grid h3 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.modal-detail-grid li,
.modal-detail-grid p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.modal-detail-grid li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
}

.modal-detail-grid li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* ==============================
   404 PAGE
   ============================== */
.not-found-page {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 30px 80px;
}

.not-found-code {
    font-family: var(--font-display);
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.not-found-page h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 14px;
}

.not-found-page p {
    max-width: 560px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* ==============================
   FOOTER
   ============================== */
.footer {
    padding: 40px 60px;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links a.instagram:hover {
    color: #E4405F;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 900px) {
    .navbar {
        padding: 20px 30px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100dvh; /* Safari iOS fix */
        height: -webkit-fill-available; /* Safari fallback */
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 100px 40px;
        gap: 30px;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border);
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25);
        z-index: 99;
    }

    .language-switcher {
        order: -1;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 120px 30px 60px;
    }

    .hero-content {
        max-width: 100%;
    }

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

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

    .hero-visual {
        margin-bottom: 40px;
    }

    .hero-avatar {
        width: 200px;
        height: 200px;
    }

    .avatar-placeholder {
        font-size: 3rem;
    }

    .hero-glow {
        width: 240px;
        height: 240px;
    }

    .about {
        padding: 80px 30px;
    }

    .availability {
        padding: 60px 30px;
    }

    .availability-inner {
        grid-template-columns: 1fr;
    }

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

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

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

    .timeline {
        padding-left: 30px;
        padding-right: 30px;
    }

    .timeline-item::before {
        left: -36px;
        right: auto;
    }

    html[dir="rtl"] .timeline {
        padding-left: 30px;
        padding-right: 0;
    }

    html[dir="rtl"] .timeline-item::before {
        left: auto;
        right: -36px;
    }

    .projects {
        padding: 80px 30px;
    }

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

    .certifications {
        padding: 80px 30px;
    }

    .testimonials {
        padding: 80px 30px;
    }

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

    .skills {
        padding: 80px 30px;
    }

    .education-card {
        padding: 24px;
    }

    .edu-header {
        flex-direction: column;
        text-align: center;
    }

    .contact {
        padding: 80px 30px;
    }

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

    .modal-hero,
    .modal-detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-detail-grid section:last-child {
        grid-column: auto;
    }

    .modal-hero img {
        height: 240px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 30px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .navbar,
html[dir="rtl"] .hero,
html[dir="rtl"] .footer-content,
html[dir="rtl"] .contact-item,
html[dir="rtl"] .skill-category h3,
html[dir="rtl"] .hero-socials a {
    direction: rtl;
}

html[dir="rtl"] .hero-name,
html[dir="rtl"] .section-header,
html[dir="rtl"] .availability-card,
html[dir="rtl"] .stat-card,
html[dir="rtl"] .cert-card,
html[dir="rtl"] .testimonial-card,
html[dir="rtl"] .project-card,
html[dir="rtl"] .education-card,
html[dir="rtl"] .contact-form {
    text-align: right;
}

html[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 40px;
}

html[dir="rtl"] .timeline::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .timeline-item::before {
    left: auto;
    right: -46px;
}

html[dir="rtl"] .project-highlights li,
html[dir="rtl"] .modal-detail-grid li {
    padding-left: 0;
    padding-right: 18px;
}

html[dir="rtl"] .project-highlights li::before,
html[dir="rtl"] .modal-detail-grid li::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .modal-close {
    right: auto;
    left: 16px;
}

html[dir="rtl"] .edu-courses {
    text-align: right;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    #particles {
        display: none;
    }

    .project-card:hover,
    .project-card:hover .project-thumb img,
    .btn-primary:hover,
    .btn-outline:hover,
    .stat-card:hover,
    .skill-category:hover,
    .cert-card:hover,
    .testimonial-card:hover,
    .linkedin-badge:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

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

    .navbar .nav-actions {
        flex-direction: row;
        gap: 8px;
    }

    .language-switcher {
        padding: 2px;
    }

    .language-option {
        min-width: 28px;
        min-height: 26px;
        font-size: 0.65rem;
    }
}

/* ==============================
   MOBILE NAVIGATION
   ============================== */
@media (max-width: 1120px) {
    .navbar {
        padding: 18px clamp(20px, 6vw, 40px);
    }

    .nav-actions {
        margin-inline-start: auto;
        gap: 10px;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: min(320px, calc(100vw - 40px)) !important;
        max-width: calc(100vw - 40px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        padding: 96px 24px 28px;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.35s ease, visibility 0.35s ease;
        z-index: 99;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        min-height: 44px;
        width: 100%;
        padding: 10px 0;
        font-size: 0.96rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    html[dir="rtl"] .nav-links {
        right: auto !important;
        left: 0 !important;
        text-align: right;
        border-left: 0;
        border-right: 1px solid var(--border);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25);
        transform: translateX(-100%);
    }

    html[dir="rtl"] .nav-links.active {
        transform: translateX(0);
    }
}

/* ==============================
   RTL MOBILE FIXES
   ============================== */
/* ==============================
   RTL MOBILE FIXES & VIEWPORT STABILITY
   ============================== */
@media (max-width: 900px) {
    html[dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        border-left: none;
        border-right: 1px solid var(--border);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25);
        transform: translateX(-100%);
    }

    html[dir="rtl"] .nav-links.active {
        right: auto;
        left: 0;
        transform: translateX(0);
    }

    html[dir="rtl"] .about-text,
    html[dir="rtl"] .timeline-content,
    html[dir="rtl"] .project-info,
    html[dir="rtl"] .contact-info > p {
        text-align: right;
        direction: rtl;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }

    html[dir="rtl"] .stat-card {
        text-align: right;
        flex-direction: row-reverse;
    }

    .stat-number {
        margin-bottom: 0;
        font-size: 2rem;
    }

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

    .navbar .nav-actions {
        flex-direction: row;
        gap: 8px;
    }

    .language-switcher {
        padding: 2px;
    }

    .language-option {
        min-width: 28px;
        min-height: 26px;
        font-size: 0.65rem;
    }

    /* --- CRITICAL RTL IPHONE FIX --- */
    html[dir="rtl"], 
    html[dir="rtl"] body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        position: relative !important;
    }

    /* Force all structural components to stretch to full width instead of breaking right-to-left boundaries */
    html[dir="rtl"] .navbar,
    html[dir="rtl"] .hero,
    html[dir="rtl"] .availability,
    html[dir="rtl"] .certifications,
    html[dir="rtl"] .about,
    html[dir="rtl"] .projects,
    html[dir="rtl"] .skills,
    html[dir="rtl"] .testimonials,
    html[dir="rtl"] .contact,
    html[dir="rtl"] .footer {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Hamburger menu must NOT be affected by RTL width fixes - needs to stay positionable */
    html[dir="rtl"] .nav-links {
        width: min(320px, calc(100vw - 40px)) !important;
        max-width: calc(100vw - 40px) !important;
        right: auto !important;
        left: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.35s ease, visibility 0.35s ease !important;
    }

    html[dir="rtl"] .nav-links.active {
        transform: translateX(0) !important;
        transition: transform 0.35s ease, visibility 0.35s ease !important;
    }
}
