/* ===== CSS Variables ===== */
:root {
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --accent-primary: #7c3aed;
    --accent-secondary: #9333ea;
    --accent-light: #ede9fe;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f0f0f;
        --bg-secondary: #1a1a1a;
        --text-primary: #f5f5f5;
        --text-secondary: #a0aec0;
        --accent-primary: #a78bfa;
        --accent-secondary: #8b5cf6;
        --accent-light: #2d1b4e;
        --border-color: #2d3748;
        --card-bg: #1a1a1a;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.title {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* ===== Section Styles ===== */
section {
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease 0.3s both;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.about p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Tech Stack Section ===== */
.tech-stack h2 {
    text-align: center;
    display: block;
}

.tech-stack h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item:hover::before {
    opacity: 1;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

/* Brand colors for each tech */
.tech-item[data-tech="airflow"]::before {
    background: linear-gradient(90deg, #017cee, #00c7d4);
}

.tech-item[data-tech="kubernetes"]::before {
    background: #326CE5;
}

.tech-item[data-tech="aws"]::before {
    background: linear-gradient(90deg, #FF9900, #232F3E);
}

.tech-item[data-tech="snowflake"]::before {
    background: linear-gradient(90deg, #29B5E8, #1E88E5);
}

.tech-item[data-tech="kafka"]::before {
    background: #231F20;
}

@media (prefers-color-scheme: dark) {
    .tech-item[data-tech="kafka"]::before {
        background: linear-gradient(90deg, #ffffff, #cccccc);
    }
}

.tech-item svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tech-item:hover svg {
    transform: scale(1.1);
}

/* Kafka logo - change color based on theme */
.kafka-logo path {
    fill: #231f20;
}

@media (prefers-color-scheme: dark) {
    .kafka-logo path {
        fill: #e5e5e5;
    }
}

/* Brand colors for top border accent */
.tech-item[data-tech="python"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #366994, #ffc331);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item[data-tech="python"]:hover::before {
    opacity: 1;
}

.tech-item[data-tech="kafka"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #231f20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item[data-tech="kafka"]:hover::before {
    opacity: 1;
}

@media (prefers-color-scheme: dark) {
    .tech-item[data-tech="kafka"]::before {
        background: #e5e5e5;
    }
}

.tech-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 0.025em;
}

/* ===== Contact Section ===== */
.contact {
    text-align: center;
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.contact h2 {
    display: inline-block;
}

.contact > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--accent-light);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contact-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: none;
}

.contact-link:last-child svg {
    fill: none;
    stroke: currentColor;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

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

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .name {
        font-size: 2.5rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    section h2 {
        font-size: 1.75rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    .tech-item {
        padding: 1.5rem 0.75rem;
    }

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

    .contact-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1.25rem;
    }

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

    .about,
    .contact {
        padding: 1.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .tech-item:hover,
    .contact-link:hover {
        transform: none;
        box-shadow: none;
    }
}
