/* ===== CSS Variables ===== */
:root {
    --color-midnight: #000000;
    --color-dark: #1d1d1f;
    --color-gray-dark: #2d2d2d;
    --color-gray: #86868b;
    --color-gray-light: #d2d2d7;
    --color-white: #ffffff;
    --color-off-white: #f5f5f7;
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;
    --color-gradient-start: #2997ff;
    --color-gradient-end: #5ac8fa;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-midnight);
    color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
}

.logo-icon {
    font-size: 1.4rem;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-gray-light);
    transition: color var(--transition-fast);
}

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

.nav-cta {
    background: var(--color-accent);
    padding: 8px 18px;
    border-radius: 20px;
    color: var(--color-white) !important;
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--color-accent-hover);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(41, 151, 255, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--color-gray);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius-xl);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.profile-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.profile-image {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
}

.profile-status {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-dark);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #30d158;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-gray);
    font-size: 0.85rem;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-gray-light);
    border-radius: 2px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* ===== Section Common Styles ===== */
section {
    padding: 120px 24px;
}

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

.section-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about {
    background: linear-gradient(180deg, var(--color-midnight) 0%, var(--color-dark) 100%);
}

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

.about-lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-white);
    line-height: 1.6;
    margin-bottom: 24px;
}

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

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    flex-direction: column;
}

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

.stat-label {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-top: 4px;
}

/* ===== Code Window ===== */
.code-window {
    background: #1e1e1e;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #2d2d2d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-title {
    margin-left: 16px;
    font-size: 0.85rem;
    color: var(--color-gray);
}

.code-content {
    padding: 24px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #d4d4d4;
}

.code-content .keyword { color: #569cd6; }
.code-content .class-name { color: #4ec9b0; }
.code-content .string { color: #ce9178; }
.code-content .method { color: #dcdcaa; }

/* ===== Expertise Section ===== */
.expertise {
    background: var(--color-dark);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.expertise-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 32px;
    transition: all var(--transition-normal);
}

.expertise-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.expertise-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-gradient-end));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.expertise-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-white);
}

.expertise-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.expertise-card p {
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Experience Section ===== */
.experience {
    background: linear-gradient(180deg, var(--color-dark) 0%, var(--color-midnight) 100%);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

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

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -5px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    border: 2px solid var(--color-midnight);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 28px;
}

.timeline-header {
    margin-bottom: 16px;
}

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

.timeline-company {
    display: block;
    color: var(--color-accent);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.timeline-date {
    display: block;
    color: var(--color-gray);
    font-size: 0.85rem;
}

.timeline-content p {
    color: var(--color-gray-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.timeline-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.highlight {
    background: rgba(41, 151, 255, 0.1);
    color: var(--color-accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== Skills Section ===== */
.skills {
    background: var(--color-midnight);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 28px;
}

.skill-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-gray-light);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.skill-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.skill-level {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.skill-item.high .skill-level {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
}

.skill-item.medium .skill-level {
    background: rgba(41, 151, 255, 0.15);
    color: var(--color-accent);
}

.skill-item.low .skill-level {
    background: rgba(255, 214, 10, 0.15);
    color: #ffd60a;
}

/* ===== Contact Section ===== */
.contact {
    background: linear-gradient(180deg, var(--color-midnight) 0%, var(--color-dark) 100%);
}

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

.contact-text .section-label {
    text-align: left;
}

.contact-text .section-title {
    text-align: left;
    margin: 0 0 24px 0;
}

.contact-description {
    color: var(--color-gray);
    font-size: 1.1rem;
    line-height: 1.7;
}

.contact-info {
    display: grid;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.contact-card:not(.location):hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-accent);
    transform: translateX(8px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-gradient-end));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-white);
}

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

.contact-label {
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-dark);
    padding: 40px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.footer-text {
    color: var(--color-gray);
    font-size: 0.9rem;
}

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

.footer-links a {
    color: var(--color-gray);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .profile-image {
        width: 260px;
        height: 260px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .expertise-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item {
        padding-left: 32px;
    }
    
    .contact-content {
        gap: 40px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 80px 16px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .code-content {
        font-size: 0.75rem;
        padding: 16px;
    }
    
    .expertise-card,
    .skill-category,
    .timeline-content,
    .contact-card {
        padding: 20px;
    }
}
