/* Sleek Dark Mode Theme */
:root {
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --primary-light: #33ddff;
    --accent: #ff6b35;
    --surface: #1a1a1a;
    --surface-elevated: #222222;
    --surface-variant: #2a2a2a;
    --surface-container: #333333;
    --background: #0f0f0f;
    --on-surface: #ffffff;
    --on-surface-variant: #e0e0e0;
    --on-primary: #000000;
    --outline: #666666;
    --outline-variant: #444444;
    --shadow: rgba(0,0,0,0.4);
    --shadow-elevated: rgba(0,0,0,0.6);
}

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

body {
    font-family: 'Lato', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a1a1a 100%);
    min-height: 100vh;
    color: var(--on-surface);
    line-height: 1.5;
    font-weight: 400;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

/* Personalized Greeting Section */
.greeting-card {
    background: var(--primary);
    color: var(--on-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px var(--shadow-elevated);
    animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.greeting-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.greeting-icon {
    font-size: 24px;
    color: var(--on-primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.greeting-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.greeting-name,
.greeting-location {
    font-weight: 700;
    color: var(--on-primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.header-card {
    background: var(--surface-elevated);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-elevated);
    margin-bottom: 32px;
}

/* OPTION 1: iOS-Compatible Geodesic Pattern Header */
.header-banner {
    height: 80px;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.2) 20%, transparent 21%),
        radial-gradient(circle at 80% 70%, rgba(0, 168, 204, 0.25) 15%, transparent 16%),
        radial-gradient(circle at 50% 10%, rgba(51, 221, 255, 0.15) 25%, transparent 26%),
        linear-gradient(45deg, rgba(0, 212, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(0, 212, 255, 0.05) 75%),
        var(--surface-variant);
    background-size: 100px 100px, 120px 120px, 80px 80px, 40px 40px;
    background-position: 0 0, 30px 20px, 60px 40px, 0 0;
    position: relative;
    overflow: hidden;
    /* iOS Safari compatibility */
    -webkit-background-size: 100px 100px, 120px 120px, 80px 80px, 40px 40px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Simplified geometric overlay for better iOS support */
.header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(30deg, transparent 30%, rgba(0, 212, 255, 0.08) 31%, rgba(0, 212, 255, 0.08) 33%, transparent 34%),
        linear-gradient(-30deg, transparent 30%, rgba(0, 168, 204, 0.08) 31%, rgba(0, 168, 204, 0.08) 33%, transparent 34%);
    background-size: 60px 60px, 80px 80px;
    -webkit-background-size: 60px 60px, 80px 80px;
    /* Force GPU acceleration on iOS */
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

.profile-section {
    padding: 40px 32px 32px 32px;
    position: relative;
    margin-top: -80px;
    display: grid;
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto 1fr;
    gap: 24px;
    align-items: start;
}

/* OPTION 2: No Header with Tight Borders (Commented Out - Uncomment to use)
.header-banner {
    height: 0px;
    display: none;
}

.profile-section {
    padding: 32px;
    position: relative;
    margin-top: 0;
    display: grid;
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto 1fr;
    gap: 24px;
    align-items: start;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 70px;
    border: 4px solid var(--primary);
    background: var(--surface-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: var(--outline);
    box-shadow: 0 8px 24px var(--shadow-elevated), 0 0 0 2px var(--surface-elevated);
    object-fit: cover;
    grid-row: 1;
    grid-column: 1;
    overflow: hidden;
    position: relative;
}

.profile-image::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 72px;
    background: linear-gradient(45deg, var(--primary), var(--primary-light), var(--primary-dark), var(--primary));
    z-index: -1;
}
*/

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 70px;
    border: 3px solid var(--surface-elevated);
    background: var(--surface-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: var(--outline);
    box-shadow: 0 8px 24px var(--shadow-elevated);
    object-fit: cover;
    grid-row: 1;
    grid-column: 1;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.profile-info {
    text-align: left;
    padding-top: 12px;
    grid-row: 1;
    grid-column: 2;
    font-family: 'Google Sans Code', 'Courier New', monospace;
}

.profile-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--on-surface);
    letter-spacing: -0.02em;
}

.profile-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.profile-location {
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.about-section {
    margin-top: 24px;
    padding: 24px;
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    grid-column: 1 / -1;
    grid-row: 2;
}

.about-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--on-surface);
    letter-spacing: -0.01em;
}

.about-content {
    position: relative;
}

.about-text {
    color: var(--on-surface-variant);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 4.8em; /* Shows approximately 3 lines */
}

.about-text.expanded {
    max-height: 500px; /* Large enough to show all content */
}

.about-text p {
    margin-bottom: 12px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-more {
    display: none;
}

.about-text.expanded .about-more {
    display: block;
}

.expand-button {
    background: none;
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    color: var(--primary);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.expand-button:hover {
    background: var(--surface-container);
    border-color: var(--primary);
}

.expand-icon {
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.expand-button.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Contact Section */
.contact-card {
    background: var(--surface-elevated);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 4px 20px var(--shadow-elevated);
    margin-bottom: 32px;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--on-surface);
    letter-spacing: -0.01em;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item:hover {
    background: var(--surface-container);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--shadow);
}

.contact-icon {
    background: var(--primary);
    color: var(--on-primary);
    padding: 12px;
    border-radius: 6px;
    font-size: 20px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Google Sans Code', 'Courier New', monospace;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    letter-spacing: -0.01em;
}

/* Resume Section */
.resume-card {
    background: var(--surface-elevated);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 4px 20px var(--shadow-elevated);
    margin-bottom: 32px;
}

.resume-description {
    font-size: 1rem;
    color: var(--on-surface-variant);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Download Button */
.download-section {
    text-align: center;
    font-family: 'Google Sans Code', 'Courier New', monospace;
}

.download-button {
    background: var(--primary);
    color: var(--on-primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.download-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--shadow);
}

/* Form Section */
.form-card {
    background: var(--surface-elevated);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 4px 20px var(--shadow-elevated);
}

.form-grid {
    display: grid;
    gap: 24px;
}

.input-group {
    position: relative;
}

.input-field {
    width: 100%;
    padding: 16px 16px 8px;
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--surface);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--on-surface);
    font-weight: 500;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    border-width: 2px;
    background: var(--surface-container);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-field:hover {
    border-color: var(--outline);
}

.input-label {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--on-surface-variant);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: var(--surface);
    padding: 0 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
    top: -10px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
}

.textarea-field {
    min-height: 100px;
    resize: vertical;
    padding-top: 24px;
}

.submit-section {
    text-align: center;
}

.submit-button {
    background: var(--primary);
    color: var(--on-primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 18px 36px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.01em;
}

.submit-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--shadow);
}

.submit-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .profile-section {
        padding: 20px 24px 24px 24px;
    }
    
    .contact-card,
    .form-card {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }
    
    .greeting-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .greeting-content {
        gap: 10px;
    }
    
    .greeting-icon {
        font-size: 20px;
    }
    
    .greeting-text {
        font-size: 0.9rem;
    }
    
    .profile-name {
        font-size: 1.8rem;
    }
    
    .header-banner {
        height: 60px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
        border-radius: 50px;
        font-size: 40px;
    }
    
    .profile-section {
        padding: 16px 20px 20px 20px;
        margin-top: -60px;
        grid-template-columns: 100px 1fr;
        gap: 16px;
    }
    
    .profile-info {
        padding-top: 8px;
    }
    
    .about-section {
        margin-top: 16px;
        padding: 20px;
    }
    
    .contact-card,
    .form-card {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .contact-item {
        padding: 16px;
        gap: 12px;
    }
    
    .contact-icon {
        padding: 10px;
        font-size: 18px;
        min-width: 36px;
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .profile-name {
        font-size: 1.6rem;
    }
    
    .profile-section {
        padding: 12px 16px 16px 16px;
        margin-top: -50px;
    }
    
    .about-section {
        margin-top: 12px;
        padding: 16px;
    }
    
    .download-button,
    .submit-button {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
    
    .input-field {
        padding: 14px 12px 6px;
    }
    
    .input-label {
        left: 12px;
        top: 14px;
    }
}

/* Performance optimizations */
.contact-item,
.download-button,
.submit-button {
    will-change: transform;
}

/* Enhanced focus indicators for accessibility */
.contact-item:focus,
.download-button:focus,
.submit-button:focus,
.input-field:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--outline-variant);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--outline);
}