/* ===== Variables ===== */
:root {
    --bg: #0f1419;
    --bg-alt: #1a232e;
    --bg-card: #232d3a;
    --text: #e6edf3;
    --text-muted: #8b9eb0;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --border: #2d3a47;
    --success: #22c55e;
    --font-sans: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 4rem;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
        var(--bg);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-photo {
    flex-shrink: 0;
    position: relative;
}

.hero-photo img {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.photo-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-card) 100%);
    border: 3px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.photo-placeholder span {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

.photo-placeholder small {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.hero-text h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--accent);
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.hero-stack {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.hero-location {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Sections ===== */
.section {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: var(--text);
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* Summary */
.summary {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.summary strong {
    color: var(--accent);
}

/* Expertise Grid */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.expertise-card {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: border-color 0.2s, transform 0.2s;
}

.expertise-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 2.5rem;
}

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

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg);
}

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

.timeline-item:last-child::before {
    display: none;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem;
}

.timeline-content .company {
    color: var(--accent);
    font-weight: 500;
    margin: 0 0 0.25rem;
}

.timeline-content .period {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.timeline-content ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
}

/* Personal Projects */
.projects-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.project-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.graduation-project {
    padding: 1.25rem 1.5rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--accent);
    border-radius: 10px;
}

.graduation-project h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.graduation-project p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* Education */
.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
}

.education-card h3 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.education-card .institution {
    color: var(--accent);
    font-weight: 500;
}

.education-card .location,
.education-card .period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Contact */
.contact-section {
    text-align: center;
}

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

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}

.contact-link:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.contact-icon {
    font-size: 1.1rem;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

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

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

    .contact-links {
        flex-direction: column;
    }

    .contact-link {
        justify-content: center;
    }
}

/* Nav mobile open state */
.nav.active .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    padding: 1rem;
    gap: 0.5rem;
}
