/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --accent-primary: #0071e3;
    --accent-secondary: #5856d6;
    --accent-orange: #ff6b35;
    --accent-green: #34c759;
    --accent-blue: #007aff;
    --gradient-orange: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    --gradient-blue: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-green: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    --border-color: #e5e5e7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== Top Navigation ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.nav-social {
    display: flex;
    gap: 14px;
}

.nav-social a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.nav-social a:hover {
    color: var(--accent-primary);
}

/* ===== Main Content ===== */
.main-content {
    padding-top: 60px;
}

.section {
    padding: 60px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

/* ===== Hero Section - Compact Bento Grid ===== */
.hero-section {
    padding-top: 100px;
    min-height: auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Profile Card - Compact */
.profile-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
}

.profile-avatar {
    margin-bottom: 12px;
}

.avatar-placeholder {
    width: 72px;
    height: 72px;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-title {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-badges {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    background: rgba(88, 86, 214, 0.1);
    color: var(--accent-secondary);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Stats Cards - Compact */
.stats-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    padding: 14px;
}

.stats-icon {
    font-size: 24px;
}

.stats-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stats-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

/* About Card */
.about-card {
    grid-column: span 2;
}

.about-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-primary);
}

.about-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tech Stack Card */
.tech-card {
    grid-column: span 2;
}

.tech-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tags span {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Specs Card */
.specs-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.specs-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.specs-mini div {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.specs-mini span {
    font-size: 14px;
}

/* Cert Card */
.cert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
}

/* ===== Projects Section ===== */
.projects-section {
    background: var(--bg-primary);
}

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

.project-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.gradient-orange {
    background: var(--gradient-orange);
}

.gradient-purple {
    background: var(--gradient-purple);
}

.gradient-blue {
    background: var(--gradient-blue);
}

.gradient-green {
    background: var(--gradient-green);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-tag {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
}

.project-link {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.35);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.project-desc {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.project-tech span {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ===== Experience Section ===== */
.experience-section {
    background: var(--bg-secondary);
}

.timeline {
    max-width: 700px;
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.timeline-marker.education {
    background: var(--accent-blue);
}

.timeline-marker.certification {
    background: var(--accent-orange);
}

.timeline-marker.achievement {
    background: var(--accent-green);
}

.timeline-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 6px;
}

.timeline-header h3 {
    font-size: 1rem;
    color: var(--text-primary);
}

.timeline-date {
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.timeline-highlight {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.9rem;
}

.timeline-details {
    color: var(--text-secondary);
    padding-left: 16px;
    font-size: 0.85rem;
}

.timeline-details li {
    list-style: disc;
    margin-bottom: 4px;
}

/* ===== Contact Section ===== */
.contact-section {
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    font-size: 0.9rem;
}

.contact-link:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.contact-link svg {
    color: var(--accent-primary);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

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

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

.form-group label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

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

.submit-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.submit-btn:hover {
    background: #005bb5;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bento-card,
.project-card,
.timeline-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.bento-card:nth-child(1) {
    animation-delay: 0.05s;
}

.bento-card:nth-child(2) {
    animation-delay: 0.1s;
}

.bento-card:nth-child(3) {
    animation-delay: 0.15s;
}

.bento-card:nth-child(4) {
    animation-delay: 0.2s;
}

.bento-card:nth-child(5) {
    animation-delay: 0.25s;
}

.bento-card:nth-child(6) {
    animation-delay: 0.3s;
}

.bento-card:nth-child(7) {
    animation-delay: 0.35s;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-card {
        grid-column: span 2;
    }

    .about-card,
    .tech-card {
        grid-column: span 2;
    }

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

@media (max-width: 600px) {
    .section {
        padding: 40px 20px;
    }

    .top-nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-card,
    .about-card,
    .tech-card {
        grid-column: span 1;
    }

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