
/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --orange-primary: #ff6b35;
    --orange-dark: #e85a28;
    --orange-light: #ff8559;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-grey: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.02) 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 0, 0, 0.012) 3px, rgba(0, 0, 0, 0.012) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0, 0, 0, 0.012) 3px, rgba(0, 0, 0, 0.012) 4px);
    background-size: 100% 100%, 100% 100%, 80px 80px, 80px 80px;
    background-position: 0 0, 0 0, 0 0, 0 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Sticky Header Navigation */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    will-change: box-shadow;
}

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

.nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: var(--transition);
    display: block;
}

.nav-logo:hover .nav-logo-img {
    opacity: 0.85;
    transform: translateY(-2px);
}

.nav-logo:focus {
    outline: 2px solid var(--orange-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

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

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

.nav-links a:hover {
    color: var(--orange-primary);
}

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

.nav-links a:focus {
    outline: 2px solid var(--orange-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 80px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
    animation: fadeIn 0.8s ease-out;
}

.hero-content {
    animation: slideUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.hero-role {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--orange-primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--orange-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--orange-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(0) scale(1);
}

.btn-secondary {
    background: white;
    color: var(--orange-primary);
    border: 2px solid var(--orange-primary);
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary:active {
    transform: translateY(0) scale(1);
}

.btn:focus {
    outline: 3px solid var(--orange-light);
    outline-offset: 3px;
}

.btn:focus-visible {
    outline: 3px solid var(--orange-primary);
    outline-offset: 3px;
}

.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-icons a {
    color: var(--text-medium);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
}

.social-icons a:hover {
    color: var(--orange-primary);
    transform: translateY(-3px) scale(1.1);
    background: rgba(255, 107, 53, 0.08);
}

.social-icons a:active {
    transform: translateY(-1px) scale(1.05);
}

.social-icons a:focus {
    outline: 2px solid var(--orange-primary);
    outline-offset: 4px;
    border-radius: 8px;
}

.social-icons a:focus-visible {
    outline: 2px solid var(--orange-primary);
    outline-offset: 2px;
}

/* Section Styles */
.section {
    padding: 80px 24px;
    animation: fadeIn 0.8s ease-out;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--orange-primary);
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title svg {
    stroke: var(--orange-primary);
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
}

.about-photo {
    position: sticky;
    top: 100px;
}

.photo-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 107, 53, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.photo-placeholder svg {
    stroke: var(--orange-primary);
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--orange-primary);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.25), 0 0 0 8px rgba(255, 107, 53, 0.1);
    transition: var(--transition);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(255, 107, 53, 0.35), 0 0 0 8px rgba(255, 107, 53, 0.15);
    border-color: var(--orange-dark);
}

.about-text p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 20px;
}

.about-text a {
    color: var(--orange-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.about-text a:hover {
    text-decoration: underline;
}

/* Experience Section */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--orange-primary), var(--orange-light));
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    animation: slideRight 0.6s ease-out;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.timeline-marker {
    position: absolute;
    left: -46px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--orange-primary);
    border: 4px solid white;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.company-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 2px solid rgba(255, 107, 53, 0.1);
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.company-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
    border-color: var(--orange-primary);
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 28px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.02), white);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-header h3 {
    font-size: 24px;
    color: var(--text-dark);
}

.company-name {
    font-size: 18px;
    color: var(--text-medium);
    font-weight: 600;
}

.company-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    color: var(--orange-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.company-link:hover {
    color: var(--orange-dark);
    gap: 8px;
}

.timeline-date {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 16px;
}

.timeline-bullets {
    list-style: none;
    padding-left: 0;
}

.timeline-bullets li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
    color: var(--text-medium);
    line-height: 1.7;
}

.timeline-bullets li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--orange-primary);
    font-weight: 700;
}

/* Skills Section */
.skills {
    background: var(--bg-light);
}

.skills-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem; /* space between cards */
  flex-wrap: nowrap; /* keeps all 4 on one line */
}

.skill-category {
    background: white;
    padding: 28px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: fadeIn 0.8s ease-out;
    flex: 1;
    min-width: 0;
}

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

.skill-category h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 16px;
}

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

.skill-tag {
    background: rgba(255, 107, 53, 0.1);
    color: var(--orange-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    cursor: default;
    border: 1px solid transparent;
}

.skill-tag:hover {
    background: var(--orange-primary);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    border-color: var(--orange-primary);
}

/* Open Source Section */
.opensource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.opensource-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    animation: fadeIn 0.8s ease-out;
}

.opensource-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.card-icon {
    margin-bottom: 20px;
    color: var(--orange-primary);
}

.opensource-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.opensource-card p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 16px;
}

.card-link {
    color: var(--orange-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.opensource-card:hover .card-link {
    gap: 8px;
}

/* Writing Section */
.writing {
    background: var(--bg-light);
}

.writing-content {
    max-width: 700px;
}

.writing-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 28px;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 900px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--bg-grey);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(255, 107, 53, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.4;
}

.contact-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.contact-cta p {
    font-size: 18px;
    color: var(--text-medium);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--orange-primary);
    transform: translateY(-2px);
}

.footer-social a:focus {
    outline: 2px solid var(--orange-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Keyboard Navigation Enhancements */
body:not(.keyboard-nav) *:focus {
    outline: none;
}

body.keyboard-nav *:focus {
    outline: 3px solid var(--orange-primary);
    outline-offset: 3px;
}

/* Skip to main content link for accessibility */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 12px 24px;
    background: var(--orange-primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    .section {
        padding: 60px 32px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 16px 24px;
    }

    .nav-logo-img {
        height: 32px;
    }

    .nav-links {
        gap: 12px;
        font-size: 14px;
    }

    .nav-links a::after {
        bottom: -2px;
    }

    .hero {
        min-height: 80vh;
        padding: 80px 24px 60px;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 60px 24px;
    }

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2rem);
        margin-bottom: 32px;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .about-photo {
        position: static;
        margin: 0 auto;
    }

    .photo-placeholder {
        width: 150px;
        height: 150px;
    }

    .photo-placeholder svg {
        width: 60px;
        height: 60px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .about-text p {
        font-size: 16px;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -38px;
    }

    .company-logo {
        width: 70px;
        height: 70px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-content {
        padding: 20px;
    }

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

    .skill-category {
        padding: 24px;
    }

    .opensource-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .opensource-card {
        padding: 24px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .nav-logo-img {
        height: 28px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .hero {
        padding: 60px 16px 40px;
    }

    .section {
        padding: 50px 16px;
    }

    .container {
        padding: 0 16px;
    }

    .social-icons {
        flex-wrap: wrap;
        gap: 12px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -32px;
        width: 12px;
        height: 12px;
    }

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

    .company-logo {
        width: 60px;
        height: 60px;
        align-self: flex-start;
    }

    .timeline-content {
        padding: 16px;
    }

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