/* ===================================
   MOBILE-FIRST PORTFOLIO CSS
   100% OPTIMIZED FOR MOBILE UX
   ================================== */

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   MOBILE CONTAINER
   ================================== */
.container {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.profile-card {
    background: #ffffff;
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

/* ===================================
   MOBILE HEADER
   ================================== */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.header h2 {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 25px;
}

/* MOBILE CONTACT - STACKED LAYOUT */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    max-width: 280px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 25px;
    width: 100%;
    min-height: 48px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
}

.contact-item:active {
    background: rgba(255,255,255,0.25);
    transform: scale(0.98);
}

.contact-item a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.contact-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ===================================
   MOBILE CONTENT
   ================================== */
.content {
    padding: 25px 20px;
}

.section {
    margin-bottom: 35px;
}

.section h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 40px;
    height: 3px;
    background: #e74c3c;
}

.section h3 i {
    color: #3498db;
    font-size: 18px;
}

/* ===================================
   MOBILE PROFESSIONAL SUMMARY
   ================================== */
.summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
    color: #444;
}

/* ===================================
   MOBILE SKILLS
   ================================== */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-category {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.skill-category h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h4 i {
    color: #3498db;
    font-size: 16px;
}

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

.skill-tag {
    background: #3498db;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.skill-tag:active {
    background: #2980b9;
    transform: scale(0.95);
}

/* ===================================
   MOBILE WORK EXPERIENCE
   ================================== */
.company-section {
    background: white;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #e9ecef;
    overflow: hidden;
}

.company-section.current-company {
    border-left-color: #27ae60;
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.1);
}

.company-section.internship {
    border-left-color: #f39c12;
}

.company-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.current-company .company-header {
    background: #e8f5e8;
}

.internship .company-header {
    background: #fff3e0;
}

.company-info h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.company-info h4 i {
    color: #3498db;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.current-company .company-info h4 i {
    color: #27ae60;
}

.internship .company-info h4 i {
    color: #f39c12;
}

.company-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.company-details span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.company-details i {
    width: 16px;
    font-size: 14px;
    color: #3498db;
    flex-shrink: 0;
}

.company-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #3498db;
    border: 2px solid #e9ecef;
    margin: 15px auto 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.current-company .company-logo {
    color: #27ae60;
    border-color: #27ae60;
}

.internship .company-logo {
    color: #f39c12;
    border-color: #f39c12;
}

.promotion-badge, .internship-badge {
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-top: 8px;
}

.internship-badge {
    background: #f39c12;
}

/* MOBILE POSITIONS */
.position-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.position-item:last-child {
    border-bottom: none;
}

.position-item.current {
    background: rgba(39, 174, 96, 0.05);
}

.position-item.intern {
    background: rgba(243, 156, 18, 0.05);
}

.position-header {
    margin-bottom: 15px;
}

.job-title {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.position-item.current .job-title::before {
    content: '⚡';
    font-size: 16px;
}

.position-item.intern .job-title::before {
    content: '🎓';
    font-size: 16px;
}

.duration {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

.duration-badge {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.duration-badge.current {
    background: #27ae60;
}

.promotion-indicator, .starting-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.promotion-indicator {
    background: #27ae60;
    color: white;
}

.starting-indicator {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #3498db;
}

/* MOBILE JOB DUTIES */
.job-duties {
    list-style: none;
    margin: 0;
}

.job-duties li {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    text-align: left;
    color: #444;
}

.job-duties li::before {
    content: '▶';
    color: #3498db;
    font-size: 10px;
    position: absolute;
    left: 0;
    top: 6px;
}

.position-item.current .job-duties li::before {
    color: #27ae60;
}

.position-item.intern .job-duties li::before {
    color: #f39c12;
}

/* ===================================
   MOBILE EDUCATION
   ================================== */
.education-card {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8a3 100%);
    padding: 20px;
    border-radius: 12px;
    color: #2c3e50;
}

.education-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.education-card p {
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.education-card strong {
    font-weight: 600;
}

.education-card em {
    font-style: italic;
    opacity: 0.9;
}

/* ===================================
   MOBILE CERTIFICATIONS
   ================================== */
.cert-category {
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.cert-category h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cert-category h4 i {
    color: #3498db;
    font-size: 16px;
}

.cert-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.cert-item:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.cert-item i {
    font-size: 20px;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.cert-item span {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

/* BRAND COLORS */
.cert-item.aws { background: linear-gradient(135deg, #ff9900, #ff7700); color: white; }
.cert-item.redhat { background: linear-gradient(135deg, #ee0000, #cc0000); color: white; }
.cert-item.acronis { background: linear-gradient(135deg, #00a4ef, #0080c7); color: white; }
.cert-item.security { background: linear-gradient(135deg, #8b0000, #660000); color: white; }
.cert-item.mikrotik { background: linear-gradient(135deg, #293239, #1a1f23); color: white; }
.cert-item.fortinet { background: linear-gradient(135deg, #ee3124, #d12b1f); color: white; }
.cert-item.cpanel { background: linear-gradient(135deg, #ff6c2c, #e55a1f); color: white; }
.cert-item.plesk { background: linear-gradient(135deg, #52bbe6, #3a9bd1); color: white; }
.cert-item.cloud { background: linear-gradient(135deg, #3498db, #2980b9); color: white; }
.cert-item.devops { background: linear-gradient(135deg, #27ae60, #229954); color: white; }

/* ===================================
   MOBILE AWARDS
   ================================== */
.award-card {
    background: linear-gradient(135deg, #ffd93d 0%, #ff6b6b 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.award-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.award-card p {
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
    text-align: left;
}

/* ===================================
   MOBILE FOOTER
   ================================== */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 25px 20px;
}

.footer p {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
    line-height: 1.5;
}

/* ===================================
   TABLET RESPONSIVE (768px+)
   ================================== */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .profile-card {
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        min-height: auto;
    }
    
    .header {
        padding: 40px;
        border-radius: 20px 20px 0 0;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
        font-size: 48px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .header h2 {
        font-size: 18px;
    }
    
    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: none;
        gap: 15px;
    }
    
    .contact-item {
        width: auto;
        min-width: 140px;
    }
    
    .skills-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .company-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .company-logo {
        margin: 0;
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .position-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .cert-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* ===================================
   DESKTOP RESPONSIVE (1024px+)
   ================================== */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 30px;
    }
    
    .header {
        padding: 50px;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
        font-size: 60px;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .header h2 {
        font-size: 20px;
    }
    
    .content {
        padding: 40px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cert-item {
        flex-direction: column;
        text-align: center;
        min-height: 120px;
        justify-content: center;
    }
    
    .cert-item i {
        font-size: 32px;
        width: auto;
        margin-bottom: 10px;
    }
    
    .cert-item span {
        text-align: center;
    }
}

/* ===================================
   ACCESSIBILITY & PERFORMANCE
   ================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-color-scheme: dark) {
    /* Dark mode support */
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
}

/* iOS Safari optimizations */
@supports (-webkit-touch-callout: none) {
    .contact-item,
    .skill-tag,
    .cert-item {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
    }
}

/* Print styles */
@media print {
    .profile-card {
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid #3498db;
    }
    
    .contact-item a {
        color: black !important;
    }
}
