:root {
    --primary-color: #0066cc;
    --secondary-color: #00d4ff;
    --accent-color: #7aa2f7;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #ffffff;
    --bg-secondary: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
}

[data-theme="dark"] {
    --text-dark: #ffffff;
    --text-light: #bbb;
    --bg-light: #0f172a;
    --bg-secondary: #111827;
    --border-color: #444;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    background-image: linear-gradient(to right, rgba(0, 102, 204, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 102, 204, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

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

/* Navigation */
.navbar {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-mono);
}

.logo-link {
    text-decoration: none;
    cursor: pointer;
}

.logo-link:hover {
    filter: brightness(1.05);
}

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

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-links a.active {
    color: var(--primary-color);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0.5rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-secondary) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Mouse gradient effect */
.hero::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .hero::before {
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content::before {
    content: 'const profile = { role: "technical-lead" };';
    display: block;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.cursor {
    display: inline-block;
    width: 3px;
    margin-left: 2px;
    animation: blink 1s infinite;
    color: var(--primary-color);
}

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

.description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.description::before {
    content: '//';
    margin-right: 0.5rem;
    color: var(--accent-color);
    font-family: var(--font-mono);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.terminal-card {
    width: min(780px, 100%);
    margin: 2rem auto 0;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 12px 28px rgba(2, 8, 20, 0.18);
    background: #0b1220;
    color: #d6e2ff;
}

[data-theme="dark"] .terminal-card {
    border-color: #263145;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: #121c2f;
    border-bottom: 1px solid #263145;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

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

.terminal-title {
    margin-left: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #99add8;
}

.terminal-body {
    padding: 1rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    line-height: 1.6;
}

.terminal-body p {
    margin: 0.15rem 0;
}

.prompt {
    color: #9be564;
    font-weight: 700;
    margin-right: 0.45rem;
}

.terminal-output {
    color: #c5d4f4;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

.btn.magnetic,
.social-link.magnetic {
    will-change: transform;
}

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

.btn-primary:hover {
    background-color: #0052a3;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Resume Spotlight Section */
.resume-spotlight {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.resume-spotlight h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.resume-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.resume-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.resume-tab {
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.resume-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.resume-panels {
    max-width: 900px;
    margin: 0 auto;
}

.resume-panel {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.resume-panel h3 {
    color: var(--primary-color);
}

.resume-role {
    color: var(--text-light);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.resume-panel ul {
    padding-left: 1.2rem;
}

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

.metric-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.resume-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Skills Section */
.skills {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.skills h2::before,
.contact h2::before,
.resume-spotlight h2::before {
    content: '<';
    color: var(--accent-color);
    margin-right: 0.3rem;
    font-family: var(--font-mono);
}

.skills h2::after,
.contact h2::after,
.resume-spotlight h2::after {
    content: ' />';
    color: var(--accent-color);
    margin-left: 0.3rem;
    font-family: var(--font-mono);
}

.skills h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
    cursor: pointer;
}

.skill-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

[data-theme="dark"] .skill-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.skill-extra {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.95rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.8rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.skill-card.expanded .skill-extra {
    max-height: 110px;
    opacity: 1;
}

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

.skill-card li {
    color: var(--text-light);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.skill-card li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.contact-info {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 600;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1000;
    transition: width 0.1s;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #0052a3;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Form Success Message */
.form-success {
    display: none;
    background-color: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    color: #27ae60;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

[data-theme="dark"] .form-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .terminal-card {
        margin-top: 1.5rem;
    }

    .btn {
        width: 100%;
        max-width: 200px;
    }

    .skills h2,
    .contact h2 {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

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

    .subtitle {
        font-size: 1rem;
    }

    .description {
        font-size: 0.95rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .skills h2,
    .contact h2 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }

    body {
        background-image: none;
    }
}
