/* ===== Variables - Black & White Professional ===== */
:root {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --radius: 6px;
    --radius-lg: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: 0.2s ease;
    /* Light mode (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e5e5e5;
    --text-primary: #000000;
    --text-secondary: #525252;
    --text-muted: #737373;
    --border: #e5e5e5;
    --border-strong: #d4d4d4;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --btn-primary-bg: #000000;
    --btn-primary-text: #ffffff;
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #171717;
    --bg-tertiary: #262626;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --border: #404040;
    --border-strong: #525252;
    --nav-bg: rgba(0, 0, 0, 0.98);
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

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

a:hover {
    color: var(--text-muted);
}

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

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    border-color: var(--border-strong);
}

.theme-icon {
    position: absolute;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: opacity var(--transition);
}

.theme-icon.moon {
    opacity: 0;
}

[data-theme="dark"] .theme-icon.sun {
    opacity: 0;
}

[data-theme="dark"] .theme-icon.moon {
    opacity: 1;
}

.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-primary);
    border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 8rem 4rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-greeting {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 2rem;
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 2px solid var(--btn-primary-bg);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Terminal Window */
.terminal-window {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red { background: var(--text-secondary); }
.terminal-dot.yellow { background: var(--text-muted); }
.terminal-dot.green { background: var(--border-strong); }

.terminal-title {
    margin-left: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.terminal-body p {
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--text-secondary);
}

.output {
    color: var(--text-muted);
    margin-left: 1rem;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

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

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

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* About */
.about-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 1rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.skill-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.skill-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

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

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.timeline-marker {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    background: var(--text-primary);
    border-radius: 50%;
    margin-top: 0.5rem;
    box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-content {
    flex: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

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

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-content li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.project-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.project-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.project-tech {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.project-card ul {
    list-style: none;
}

.project-card li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.project-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.education-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.education-card h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.edu-school {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.edu-location, .edu-result {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.edu-date {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Certifications */
.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cert-badge {
    flex-shrink: 0;
    padding: 0.25rem 0.75rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
}

.cert-item p {
    color: var(--text-secondary);
}

.languages {
    margin-top: 1.5rem;
}

.languages h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.languages p {
    color: var(--text-secondary);
}

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

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.contact-link {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.contact-link:hover {
    color: var(--text-muted);
}

.contact-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-primary);
}

.social-link:hover {
    border-color: var(--text-primary);
}

/* 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: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem 3rem;
    }

    .hero-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav.active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .section {
        padding: 3rem 2rem;
    }
}

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

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
