/* Reset styles */
* {
    box-sizing: border-box;
}

html:focus-within {
    scroll-behavior: smooth;
}

body, h1, h2, h3, p {
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

/* Theme variables */
:root {
    --bg: #0b0c0f;
    --surface: #12151a;
    --text: #e8eaed;
    --muted: #a1a7b3;
    --border: #232833;
    --accent: #7c5cff;
    --accent-2: #019c66;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

:root.light {
    --bg: #f8fafc;
    --surface: #fff;
    --text: #0b1220;
    --muted: #4b5563;
    --border: #e5e7eb;
    --accent: #5b21b6;
    --accent-2: #019c66;
}

/* Animations */
@keyframes gradient {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); opacity: 0.08; }
    50% { transform: translateY(-20px) rotate(6deg); opacity: 0.12; }
    100% { transform: translateY(0px) rotate(0deg); opacity: 0.08; }
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 
                 system-ui, ui-sans-serif, Helvetica Neue, Arial, 
                 'Apple Color Emoji', 'SF Pro Icons', sans-serif;
    background: linear-gradient(-45deg, 
        var(--bg), 
        color-mix(in hsl, var(--accent) 30%, var(--bg)),
        color-mix(in hsl, var(--accent-2) 25%, var(--bg)),
        var(--bg));
    background-size: 150% 150%;
    animation: gradient 12s ease-in-out infinite;
    color: var(--text);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Background shapes */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.08;
    z-index: -1;
    animation: float 8s ease-in-out infinite;
    filter: blur(60px);
}

body::before {
    top: -35vmax;
    right: -20vmax;
    animation-delay: 0.5s;
    background: var(--accent);
}

body::after {
    bottom: -35vmax;
    left: -20vmax;
    animation-delay: 1s;
    background: var(--accent-2);
}
/* Layout */
.container {
    width: min(1100px, 92%);
    margin-inline: auto;
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    background: var(--surface);
    color: var(--text);
    padding: .75rem 1rem;
    border-radius: .5rem;
}

.skip-link:focus {
    left: .75rem;
    top: .75rem;
    z-index: 1000;
    box-shadow: var(--shadow);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in hsl, var(--bg) 95%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid color-mix(in hsl, var(--border) 50%, transparent);
    margin-bottom: 1rem;
}

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

.brand {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    font-family: 'Fira Code', 'SF Mono', monospace;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.brand:hover {
    color: var(--accent-2);
}

.brand img {
    transition: transform 0.2s ease;
}

.brand:hover img {
    transform: rotate(-5deg);
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    font-size: 0.95rem;
}

.nav-menu a {
    padding: 0.6rem 0.9rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--text);
    background: color-mix(in hsl, var(--surface) 50%, transparent);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0.4rem;
    left: 0.9rem;
    right: 0.9rem;
    height: 2px;
    background: var(--accent-2);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    border-radius: 1px;
    opacity: 0.7;
}

.nav-menu a:hover::after {
    transform: scaleX(1);
}

.social-links {
    display: flex;
    gap: 0.5rem;
    margin-left: 0.5rem;
    padding: 0.25rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    color: var(--text);
    transition: all 0.2s ease;
    background: color-mix(in hsl, var(--surface) 50%, transparent);
    backdrop-filter: blur(8px);
}

.social-link:hover {
    background: var(--accent-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.social-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    padding: .5rem;
    border-radius: .6rem;
}

.nav-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 3px 0;
}

/* Hero section */
.hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 2rem;
    align-items: center;
    padding: 4rem 0 3rem;
}

.hero-media {
    position: relative;
    padding: 1.5rem;
    perspective: 1000px;
}

.hero-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        color-mix(in hsl, var(--accent-2) 10%, var(--surface)),
        color-mix(in hsl, var(--accent) 10%, var(--surface))
    );
    clip-path: polygon(
        0% 0%,
        100% 15%,
        100% 85%,
        0% 100%
    );
    border: 1px solid var(--border);
    transform: translateX(1rem) rotateY(-15deg);
    z-index: -1;
}

.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: color-mix(in hsl, var(--accent) 5%, var(--surface));
    clip-path: polygon(
        5% 0%,
        100% 0%,
        95% 100%,
        0% 100%
    );
    border: 1px solid var(--border);
    transform: translateX(-0.5rem) rotateY(5deg);
    z-index: -2;
}

.hero-media img {
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateZ(0) rotate(0);
}

.hero-media:hover img {
    transform: translateZ(20px) rotate(3deg);
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.3),
        0 0 0 1px var(--accent-2);
}

.hero-media:hover::before {
    transform: translateX(1.2rem) rotateY(-18deg);
}

.hero-media:hover::after {
    transform: translateX(-0.7rem) rotateY(8deg);
}

/* Add tech-inspired decorative elements */
.hero-media::before,
.hero-media::after {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
/* Typography */
h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: .75rem;
}

.lead {
    color: var(--muted);
    font-size: 1.1rem;
}

.accent {
    color: var(--accent-2);
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2em;
    height: 3px;
    background: var(--accent-2);
    border-radius: 2px;
}

.section p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 65ch;
    line-height: 1.7;
}

/* Components */
.cta-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.theme-toggle {
    padding: 0.6rem;
    border-radius: 0.75rem;
    color: var(--muted);
    border: 1px solid transparent;
    background: color-mix(in hsl, var(--surface) 50%, transparent);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
}

.theme-toggle:hover {
    color: var(--text);
    transform: translateY(-1px);
    background: var(--surface);
    border-color: var(--border);
}

.theme-icon {
    width: 1.25rem;
    height: 1.25rem;
    position: absolute;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.sun-icon {
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
}

.moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

:root.light .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

:root.light .moon-icon {
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
}

.quickfacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
}

.quickfacts li {
    display: grid;
    gap: 0.25rem;
}

.quickfacts strong {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: .25rem;
}

.card p {
    color: var(--muted);
}
/* Tags */
.tags {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: .75rem 0;
}

.tags li {
    font-size: .85rem;
    background: color-mix(in hsl, var(--accent) 20%, transparent);
    border: 1px solid var(--border);
    padding: .25rem .5rem;
    border-radius: .5rem;
}

.card-actions {
    display: flex;
    gap: .5rem;
}

/* Timeline */
.timeline {
    display: grid;
    gap: 1rem;
}

.job {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
}

.job-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
}

.job p {
    color: var(--muted);
}
/* Forms */
.contact-form {
    display: grid;
    gap: .75rem;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

.form-success {
    background: color-mix(in hsl, var(--accent-2) 15%, var(--surface));
    border: 1px solid var(--accent-2);
    color: var(--text);
    padding: 1rem;
    border-radius: .6rem;
    text-align: center;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.field {
    display: grid;
    gap: .25rem;
}

input,
textarea {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: .6rem;
    padding: .6rem .75rem;
    font-family: inherit;
    font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    font-family: inherit;
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: color-mix(in hsl, var(--surface) 50%, transparent);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
    transform: scale(1.1);
}

.btn:hover {
    background: var(--surface);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn.primary {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #fff;
}

.btn.primary:hover {
    background: color-mix(in hsl, var(--accent-2) 90%, white);
    border-color: color-mix(in hsl, var(--accent-2) 90%, white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in hsl, var(--accent-2) 30%, transparent);
}

.btn.secondary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn.secondary:hover {
    background: color-mix(in hsl, var(--accent) 90%, white);
    border-color: color-mix(in hsl, var(--accent) 90%, white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in hsl, var(--accent) 30%, transparent);
}

.btn.small {
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    border-radius: 0.6rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-inner .social {
    display: inline-flex;
    gap: .75rem;
}

.footer-inner a {
    color: var(--muted);
    text-decoration: none;
}

.footer-inner a:hover {
    color: var(--text);
}

/* Responsive Design */
@media (max-width: 820px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 3rem;
    }

    .nav-toggle {
        display: inline-block;
    }

    .nav-menu {
        position: absolute;
        right: .75rem;
        top: 56px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: .75rem;
        padding: .75rem;
        display: none;
        flex-direction: column;
        min-width: 200px;
        box-shadow: var(--shadow);
        gap: 0.5rem;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a,
    .theme-toggle {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }

    .theme-toggle {
        width: auto;
        margin: 0.25rem 0;
        background: color-mix(in hsl, var(--surface) 70%, transparent);
    }
}