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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --accent-color: #14b8a6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Improved Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure sufficient color contrast */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 8px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    display: block;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        text-shadow: none;
    }
    93% {
        text-shadow: 3px 3px 0 #ff00de, -3px -3px 0 #00ffff;
    }
    96% {
        text-shadow: -3px -3px 0 #ff00de, 3px 3px 0 #00ffff;
    }
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.floating-code {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    font-family: 'Fira Code', monospace;
    color: #4ade80;
    font-size: 1.25rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.code-line {
    margin: 0.5rem 0;
    animation: typing 2s steps(20) infinite;
}

/* Section Styling */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.about-content {
    display: grid;
    gap: 3rem;
}

.about-text {
    font-size: 1.125rem;
}

.lead {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.fun-facts {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.fun-facts h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.fact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.fact-item strong {
    color: var(--primary-color);
}

.emoji {
    font-size: 1.5rem;
}

.philosophy {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.philosophy h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.philosophy p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2;
}

.timeline-dot:hover {
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3);
}

.timeline-dot::after {
    content: attr(data-date);
    position: absolute;
    top: 50%;
    right: calc(100% + 15px);
    transform: translateY(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.timeline-dot:hover::after {
    opacity: 1;
}

/* Special "What's Next" Timeline Item */
.timeline-dot-next {
    background: var(--secondary-color);
    box-shadow: 0 0 0 4px var(--secondary-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--secondary-color);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(236, 72, 153, 0.4);
    }
}

.timeline-dot-next:hover {
    transform: translateY(-50%) scale(1.3);
    animation: none;
}

.timeline-content-next {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
    border: 2px solid var(--secondary-color);
}

.company-next {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.25rem;
    display: block;
    margin-bottom: 1rem;
}

.next-message {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 1rem 0;
}

.next-cta {
    margin-top: 1.5rem;
}

.btn-next {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.company {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 1rem;
    display: inline-block;
}

.date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: inline-block;
}

.achievements {
    list-style: none;
    margin: 1.5rem 0;
}

.achievements li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--text-secondary);
    text-align: left;
}

.achievements li::before {
    content: '◇';
    position: absolute;
    left: 0;
    top: 0.35em;
    color: var(--primary-color);
    font-size: 0.65rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.companies-list {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 1rem 0;
}

.experience-note {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
}

.skill-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 1s ease;
}

.additional-skills {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.additional-skills h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.tech-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cloud-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 25px;
    font-weight: 500;
    transition: transform 0.3s ease;
    cursor: default;
}

.cloud-tag:hover {
    transform: scale(1.05);
}

/* Education Section */
.education {
    background: var(--bg-secondary);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

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

.degree-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.education-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.school {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.grad-year {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-intro {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.contact-method svg {
    flex-shrink: 0;
}

.location-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.location-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.location-note {
    margin-top: 1rem;
    opacity: 0.8;
    font-size: 0.9375rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    text-align: center;
}

.footer-note {
    font-size: 0.875rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

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

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

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-dot {
        left: 1px;
        top: 50%;
        transform: translateY(-50%);
    }

    .timeline-dot:hover {
        transform: translateY(-50%) scale(1.3);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

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

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

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

    .additional-skills {
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Animation delays for staggered effects */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

/* Smooth entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

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

    .glitch {
        animation: none;
    }

    .floating-code {
        animation: none;
    }
}
