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

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

/* Letter scramble effect */
.letter {
    cursor: pointer;
    transition: color 0.2s ease;
    display: inline;
    font-family: var(--font-mono);
    min-width: 1ch;
}

.letter:hover {
    color: var(--green);
}

:root {
    /* Brittany Chiang inspired monochromatic palette */
    --navy-darkest: #020c1b;
    --navy-dark: #0a192f;
    --navy: #112240;
    --navy-light: #1d3557;
    --navy-lightest: #233554;
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;
    --green-tint: rgba(100, 255, 218, 0.1);

    /* Typography */
    --font-sans: 'Inter', 'San Francisco', 'SF Pro Text', -apple-system, system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;

    /* Font sizes */
    --fz-xxs: 12px;
    --fz-xs: 13px;
    --fz-sm: 14px;
    --fz-md: 16px;
    --fz-lg: 18px;
    --fz-xl: 20px;
    --fz-xxl: 22px;
    --fz-heading: 32px;

    /* Spacing */
    --nav-height: 60px;

    /* Transitions */
    --easing: cubic-bezier(0.645, 0.045, 0.355, 1);
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);

    /* Borders */
    --border-radius: 4px;

    /* Shadows */
    --shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

/* Light theme overrides */
[data-theme="light"] {
    --navy-darkest: #f8fafc;
    --navy-dark: #f1f5f9;
    --navy: #e2e8f0;
    --navy-light: #cbd5e1;
    --navy-lightest: #94a3b8;
    --slate: #475569;
    --light-slate: #334155;
    --lightest-slate: #1e293b;
    --white: #0f172a;
    --green: #059669;
    --green-tint: rgba(5, 150, 105, 0.1);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--slate) var(--navy);
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    margin: 0;
    width: 100%;
    max-width: 100vw;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--navy-dark);
    color: var(--slate);
    font-family: var(--font-sans);
    font-size: var(--fz-xl);
    line-height: 1.3;
    position: relative;
    -webkit-tap-highlight-color: rgba(100, 255, 218, 0.1);
    -webkit-touch-callout: none;
}

/* Glossy mouse cursor effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(138, 43, 226, 0.25) 0%,
                rgba(147, 112, 219, 0.15) 30%,
                rgba(255, 255, 255, 0.05) 60%,
                transparent 80%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

body.mouse-active::before {
    opacity: 1;
}

::selection {
    background-color: var(--green-tint);
    color: var(--green);
}

:focus {
    outline: 2px dashed var(--green);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
    outline-offset: 0px;
}

:focus-visible {
    outline: 2px dashed var(--green);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--navy);
}

::-webkit-scrollbar-thumb {
    background-color: var(--slate);
    border: 3px solid var(--navy);
    border-radius: 10px;
}

/* Typography */
.big-heading {
    margin: 0 0 15px 4px;
    color: var(--lightest-slate);
    font-family: var(--font-sans);
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 400;
    line-height: 1.1;
}

.medium-heading {
    margin: 0 0 20px 2px;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: var(--fz-md);
    font-weight: 400;
}

.numbered-heading {
    display: flex;
    align-items: center;
    position: relative;
    margin: 10px 0 60px;
    width: 100%;
    font-size: clamp(36px, 6vw, 48px);
    white-space: nowrap;
    font-weight: 700;
    color: var(--lightest-slate);
    letter-spacing: -0.5px;
}

.numbered-heading:before {
    position: relative;
    bottom: 4px;
    counter-increment: section;
    content: '0' counter(section) '.';
    margin-right: 15px;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 600;
}

.numbered-heading:after {
    content: '';
    display: block;
    position: relative;
    top: -5px;
    width: 300px;
    height: 2px;
    margin-left: 30px;
    background-color: var(--lightest-slate);
}

/* Buttons */
.btn {
    color: var(--green);
    background-color: transparent;
    border: 1px solid var(--green);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.75rem;
    font-size: var(--fz-xs);
    font-family: var(--font-mono);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn:hover,
.btn:focus {
    background-color: var(--green-tint);
    outline: none;
}

.btn:after {
    display: none !important;
}

/* Main Container */
.main {
    margin: 0 auto;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    padding: 0 150px;
    counter-reset: section;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
}

@media (max-width: 1600px) {
    .main {
        max-width: 1600px;
    }
}

/* Navigation */
.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 11;
    padding: 0px 50px;
    width: 100%;
    max-width: 100vw;
    height: var(--nav-height);
    background-color: transparent;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
    overflow-x: hidden;
}

.nav.scrolled {
    height: 70px;
    transform: translateY(0px);
    background-color: transparent;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.nav-logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    grid-column: 1;
}

.nav-logo a {
    color: var(--green);
    width: 42px;
    height: 42px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: var(--fz-xl);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
    grid-column: 2;
    gap: 20px;
}

.nav-menu li {
    margin: 0 5px;
    position: relative;
    font-size: var(--fz-xs);
}

.nav-menu a {
    padding: 10px;
    text-decoration: none;
    color: var(--lightest-slate);
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    transition: var(--transition);
}

.nav-menu a:before {
    content: '0' counter(item) '.';
    margin-right: 5px;
    color: var(--green);
    font-size: var(--fz-xxs);
    text-align: right;
}

.nav-menu li {
    counter-increment: item;
}

.nav-menu a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

/* Mobile Navigation */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 15px;
    width: 40px;
    height: 40px;
    position: relative;
    grid-column: 3;
    justify-self: end;
    z-index: 12;
}

.nav-burger span {
    display: block;
    position: relative;
    width: 25px;
    height: 2px;
    background-color: var(--green);
    transition: var(--transition);
    margin: 3px 0;
}

.nav-burger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.nav-burger.active span:nth-child(2) {
    opacity: 0;
}

.nav-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

.theme-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: 1px solid var(--green);
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    color: var(--green);
    transition: var(--transition);
    grid-column: 3;
    justify-self: end;
    margin-right: 15px;
}

.theme-toggle:hover {
    background-color: var(--green-tint);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: var(--transition);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 15px;
    width: 30px;
    height: 30px;
    position: relative;
    grid-column: 3;
    justify-self: end;
}

.nav-burger span {
    display: block;
    position: relative;
    width: 30px;
    height: 2px;
    background-color: var(--green);
    transition: var(--transition);
    margin: 3px 0;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: calc(var(--nav-height) + 40px) 0 40px;
    position: relative;
    overflow: hidden;
}

/* Hero Background Animations */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.code-particle {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(100, 255, 218, 0.3);
    animation: float 15s infinite linear;
    white-space: nowrap;
}

.binary-particle {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(100, 255, 218, 0.2);
    animation: binaryFloat 12s infinite linear;
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(100, 255, 218, 0.01) 50%, transparent 100%);
    animation: glitchSweep 8s infinite ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(200px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes binaryFloat {
    0% {
        transform: translateY(100vh) translateX(-50px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

@keyframes glitchSweep {
    0%, 90% {
        transform: translateX(-100%);
        opacity: 0;
    }
    95% {
        transform: translateX(100%);
        opacity: 0.5;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-name {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    color: var(--lightest-slate);
    font-family: var(--font-sans);
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
    flex-shrink: 0;
    transform: rotate(180deg) !important;
}

.hero-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hero h2 {
    margin: 0 0 15px 0;
    color: var(--lightest-slate);
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 600;
    line-height: 1.1;
}

.hero h3 {
    margin: 0 0 20px 0;
    color: var(--slate);
    line-height: 1.3;
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 400;
}

.hero p {
    margin: 0 0 40px 0;
    max-width: 500px;
    font-size: var(--fz-lg);
    line-height: 1.6;
    color: var(--slate);
}

/* Section Styles */
section {
    margin: 0 auto;
    padding: 100px 0;
    max-width: 1000px;
}

.section-header {
    display: flex;
    align-items: center;
    position: relative;
    margin: 10px 0 40px;
    width: 100%;
    white-space: nowrap;
}

/* About Section */
.about {
    max-width: 900px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-height) + 40px) 0 40px;
    position: relative;
}

/* Tools Section */
.tools {
    max-width: 1000px;
}

.tools-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.tool-category {
    background: var(--navy);
    border: 1px solid var(--navy-lightest);
    border-radius: 8px;
    padding: 32px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(2, 12, 27, 0.15);
}

.tool-category:hover {
    transform: translateY(-2px);
    border-color: var(--green);
    box-shadow: 0 8px 24px rgba(2, 12, 27, 0.25);
}

.tool-category-title {
    color: var(--lightest-slate);
    font-size: var(--fz-xl);
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--navy-light);
    border-radius: 6px;
    border: 1px solid var(--navy-lightest);
    transition: var(--transition);
}

.tool-item:hover {
    transform: translateY(-1px);
    background: var(--navy-lightest);
    border-color: var(--green);
}

.tool-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tool-name {
    color: var(--light-slate);
    font-weight: 500;
    font-size: var(--fz-md);
}

.tool-level {
    display: flex;
    gap: 4px;
}

.skill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy-lightest);
    transition: var(--transition);
}

.skill-dot.active {
    background: var(--green);
    box-shadow: 0 0 4px rgba(100, 255, 218, 0.5);
}

.about .numbered-heading {
    margin-top: 0;
    margin-bottom: 60px;
}

.about-content {
    flex: 1;
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    width: 100%;
    max-width: 900px;
    align-items: center;
}

.about-text {
    font-size: var(--fz-lg);
}

.about-text p {
    margin: 0 0 15px;
    color: var(--slate);
}

.about-skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0px 10px;
    padding: 0;
    margin: 20px 0 0 0;
    overflow: hidden;
    list-style: none;
}

.about-skills li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--slate);
}

.about-skills li:before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: var(--fz-sm);
    line-height: 12px;
}

.about-pic {
    position: relative;
    max-width: 300px;
}

.about-pic .wrapper {
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    position: relative;
    width: 100%;
    transition: var(--transition);
}

.about-pic img {
    position: relative;
    border-radius: var(--border-radius);
    mix-blend-mode: multiply;
    filter: grayscale(100%) contrast(1);
    transition: var(--transition);
    width: 100%;
    height: auto;
}

.about-pic:hover .wrapper {
    box-shadow: 0 20px 30px -15px rgba(2, 12, 27, 0.7);
}

.about-pic:hover img {
    filter: none;
    mix-blend-mode: normal;
}

.about-pic .wrapper:before,
.about-pic .wrapper:after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.about-pic .wrapper:before {
    top: 0;
    left: 0;
    background-color: var(--navy);
    mix-blend-mode: screen;
}

.about-pic .wrapper:after {
    border: 2px solid var(--green);
    top: 20px;
    left: 20px;
    z-index: -1;
}

.about-pic:hover .wrapper:after {
    top: 15px;
    left: 15px;
}

/* Skills Section */
.skills {
    max-width: 1000px;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.skill-category {
    background: var(--navy);
    border: 1px solid var(--navy-lightest);
    border-radius: 8px;
    padding: 32px;
    position: relative;
    display: block;
    opacity: 1;
    visibility: visible;
    margin-bottom: 24px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(2, 12, 27, 0.15);
}

.skill-category:hover {
    transform: translateY(-2px);
    border-color: var(--green);
    box-shadow: 0 8px 24px rgba(2, 12, 27, 0.25);
}

.skill-category-title {
    color: var(--lightest-slate);
    font-size: var(--fz-xxl);
    font-weight: 600;
    margin-bottom: 20px;
}

.company-logo {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    transition: var(--transition);
    background: var(--white) !important;
    padding: 6px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    position: relative !important;
    border: 1px solid var(--navy-lightest);
    box-shadow: 0 2px 8px rgba(2, 12, 27, 0.1);
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(2, 12, 27, 0.2);
}

.experience-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--navy-lightest);
}

.experience-info h3 {
    margin-bottom: 6px !important;
    font-size: 1.3em;
    font-weight: 600;
}

.experience-info h4 {
    font-size: 0.9em;
    font-weight: 400;
    opacity: 0.9;
}

.experience-description {
    margin: 20px 0;
}

.experience-description ul {
    list-style: none;
    padding: 0;
}

.experience-description li {
    margin-bottom: 10px;
    color: var(--slate);
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
}

.experience-description li:before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: bold;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--navy-lightest);
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--navy-light);
    border: 1px solid var(--navy-lightest);
    border-radius: 6px;
    font-size: 13px;
    color: var(--green);
    font-family: var(--font-mono);
    transition: var(--transition);
}

.tech-badge:hover {
    background: var(--navy-lightest);
    transform: translateY(-1px);
}

.tech-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.company-positions {
    margin-top: 8px;
}

.position {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.position:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.position-title {
    font-weight: 600;
    flex: 1;
}

.position-range {
    white-space: nowrap;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--navy-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--navy-lightest);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-2px);
    background: var(--navy-lightest);
}

.skill-name {
    color: var(--light-slate);
    font-weight: 500;
    font-size: var(--fz-md);
}

.skill-level {
    display: flex;
    gap: 4px;
}

.skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navy-lightest);
    transition: var(--transition);
}

.skill-dot.active {
    background: var(--green);
}

/* Projects Section */
.projects {
    max-width: 1000px;
}

.projects-grid {
    display: grid;
    gap: 50px;
    position: relative;
}

.project {
    position: relative;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
}

.project:not(:last-of-type) {
    margin-bottom: 100px;
}

.project-content {
    position: relative;
    grid-column: 1 / 7;
    grid-row: 1 / -1;
}

.project:nth-of-type(2n + 1) .project-content {
    grid-column: 7 / -1;
    text-align: right;
}

.project-overline {
    margin: 10px 0;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    font-weight: 400;
}

.project-title {
    color: var(--lightest-slate);
    font-size: clamp(24px, 5vw, 28px);
    margin: 0 0 20px;
}

.project-title a {
    color: inherit;
    text-decoration: none;
    position: static;
}

.project-title a:before {
    content: '';
    display: block;
    position: absolute;
    z-index: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.project-description {
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    padding: 25px;
    border-radius: var(--border-radius);
    background-color: var(--navy);
    color: var(--light-slate);
    font-size: var(--fz-lg);
    line-height: 1.4;
}

.project:nth-of-type(2n + 1) .project-description {
    text-align: left;
}

.project-tech-list, .project-tech {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin: 25px 0 10px;
    padding: 0;
    list-style: none;
    gap: 8px;
}

.project-tech {
    margin-left: 40px;
}

.project-tech .tech-badge-small {
    flex: 0 0 auto;
}

.project:nth-of-type(2n + 1) .project-tech-list {
    justify-content: flex-end;
}

.project-tech-list li {
    margin: 0 20px 5px 0;
    color: var(--slate);
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    white-space: nowrap;
}

.project:nth-of-type(2n + 1) .project-tech-list li {
    margin: 0 0 5px 20px;
}

.project-links {
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 10px;
    margin-left: -10px;
    color: var(--lightest-slate);
}

.project:nth-of-type(2n + 1) .project-links {
    justify-content: flex-end;
    margin-left: 0;
    margin-right: -10px;
}

.project-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--green);
    transform: translateY(-2px);
}

.project-image {
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    grid-column: 6 / -1;
    grid-row: 1 / -1;
    position: relative;
    z-index: 1;
    height: 400px;
    background: transparent;
    overflow: hidden;
    min-width: 300px;
}

.project:nth-of-type(2n + 1) .project-image {
    grid-column: 1 / 8;
}

.project-image a {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border-radius: var(--border-radius);
    vertical-align: middle;
    position: relative;
    display: block;
}

.project-image a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    z-index: -1;
    transition: var(--transition);
    background-color: transparent;
    mix-blend-mode: normal;
}

.project-image a:hover:before {
    background: transparent;
}

.project-image img {
    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-image a:hover img {
    filter: none;
    mix-blend-mode: normal;
}

/* Achievements Section */
.achievements {
    max-width: 1000px;
}

.achievements-container {
    width: 100%;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.achievement-card {
    background: var(--navy);
    border: 1px solid var(--navy-lightest);
    border-radius: 8px;
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(2, 12, 27, 0.2);
    border-color: var(--green);
}

.achievement-card.certification {
    border-left: 4px solid var(--green);
}

.achievement-card.contest {
    border-left: 4px solid #ffd700;
}

.achievement-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.achievement-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 8px;
    padding: 6px;
    border: 1px solid var(--navy-lightest);
}

.achievement-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.achievement-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.achievement-type {
    background: var(--green-tint);
    color: var(--green);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: var(--fz-xs);
    font-family: var(--font-mono);
    font-weight: 500;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-card.contest .achievement-type {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.achievement-date {
    color: var(--slate);
    font-size: var(--fz-xs);
    font-family: var(--font-mono);
}

.achievement-content {
    flex: 1;
}

.achievement-title {
    color: var(--lightest-slate);
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.achievement-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.achievement-title a:hover {
    color: var(--green);
}

.achievement-issuer {
    color: var(--green);
    font-size: var(--fz-sm);
    font-weight: 500;
    margin: 0 0 8px 0;
}

.achievement-result {
    background: var(--navy-light);
    color: var(--lightest-slate);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: var(--fz-sm);
    font-weight: 500;
    margin: 8px 0 12px 0;
    border: 1px solid var(--navy-lightest);
}

.achievement-card.contest .achievement-result {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.2);
}

.achievement-description {
    color: var(--slate);
    font-size: var(--fz-sm);
    line-height: 1.5;
    margin: 12px 0;
}

.achievement-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.tech-badge-small {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--navy-light);
    border: 1px solid var(--navy-lightest);
    border-radius: 4px;
    font-size: var(--fz-xxs);
    font-family: var(--font-mono);
    color: var(--slate);
    white-space: nowrap;
}

.tech-badge-small img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

/* Contact Section */
.contact {
    max-width: 1000px;
    margin: 0 auto 100px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.contact-text {
    padding-right: 20px;
}

.contact-subtitle {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: var(--fz-xl);
    font-weight: 500;
    margin-bottom: 20px;
}

.contact-text p {
    color: var(--slate);
    font-size: var(--fz-lg);
    line-height: 1.6;
    margin: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    background: var(--navy);
    border: 1px solid var(--navy-lightest);
    border-radius: 8px;
    padding: 24px;
    transition: var(--transition);
    position: relative;
}

.contact-item:hover {
    transform: translateY(-2px);
    border-color: var(--green);
    box-shadow: 0 8px 24px rgba(2, 12, 27, 0.25);
}

.contact-item h4 {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: var(--fz-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.contact-item a {
    color: var(--lightest-slate);
    text-decoration: none;
    font-size: var(--fz-lg);
    font-weight: 500;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--green);
}

.contact-item span {
    color: var(--lightest-slate);
    font-size: var(--fz-lg);
    font-weight: 500;
}

.contact-links {
    display: flex;
    gap: 16px;
}

.contact-links a {
    font-size: var(--fz-md);
    padding: 8px 16px;
    background: var(--navy-light);
    border: 1px solid var(--navy-lightest);
    border-radius: 4px;
    transition: var(--transition);
}

.contact-links a:hover {
    background: var(--green-tint);
    border-color: var(--green);
    color: var(--green);
}

.contact-actions {
    margin-top: 30px;
}

.cv-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: var(--navy-dark);
    border: 1px solid var(--green);
    font-weight: 600;
    transition: var(--transition);
}

.cv-export-btn:hover {
    background: transparent;
    color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

.cv-export-btn svg {
    transition: var(--transition);
}

.cv-export-btn:hover svg {
    transform: translateY(2px);
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: auto;
    min-height: 70px;
    padding: 15px;
    text-align: center;
}

.footer .social-links {
    display: none;
}

.footer .credit {
    color: var(--light-slate);
    font-family: var(--font-mono);
    font-size: var(--fz-xxs);
    line-height: 1;
}

.footer .credit a {
    color: inherit;
    text-decoration: none;
    padding: 10px;
}

.footer .credit a:hover {
    color: var(--green);
}

/* Side Elements */
.fixed-elements {
    position: fixed;
    bottom: 0;
    width: 40px;
    z-index: 10;
}

.fixed-elements.left {
    left: 40px;
}

.fixed-elements.right {
    right: 40px;
}

.fixed-elements::after {
    content: '';
    display: block;
    width: 1px;
    height: 90px;
    margin: 0 auto;
    background-color: var(--light-slate);
}

.fixed-elements ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fixed-elements ul::after {
    content: '';
    display: block;
    width: 1px;
    height: 90px;
    background-color: var(--light-slate);
}

.fixed-elements ul li {
    padding: 10px 0;
}

.fixed-elements ul li a {
    color: var(--light-slate);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: var(--fz-xxs);
    writing-mode: vertical-rl;
    letter-spacing: 0.1em;
    transition: var(--transition);
}

.fixed-elements ul li a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

.social-links a {
    writing-mode: initial !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-links svg {
    color: var(--light-slate);
    transition: var(--transition);
}

.social-links a:hover svg {
    color: var(--green);
}

.fixed-elements.left ul li a {
    padding: 10px;
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links li {
    padding: 10px 0;
}

.social-links a {
    padding: 10px;
    color: var(--light-slate);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--green);
    transform: translateY(-3px);
}

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

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 1080px) {
    .main {
        padding: 0 100px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 10;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .main {
        padding: 0 20px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .nav {
        padding: 0 15px;
        grid-template-columns: 1fr auto auto;
        gap: 10px;
    }

    .nav-logo {
        grid-column: 1;
    }

    .theme-toggle {
        grid-column: 2;
        margin-right: 10px;
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

    .nav-burger {
        display: flex !important;
        grid-column: 3;
        margin-right: 0;
        cursor: pointer;
        z-index: 12;
        position: relative;
    }

    .nav-burger:hover span {
        background-color: var(--lightest-slate);
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: calc(100vh - var(--nav-height));
        background: var(--navy-dark);
        backdrop-filter: blur(10px);
        border-left: 1px solid var(--navy-lightest);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 30px;
        gap: 0;
        transition: right 0.3s var(--easing);
        z-index: 11;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
        opacity: 0;
        transform: translateX(20px);
    }

    .nav-menu.active li {
        animation: slideIn 0.3s forwards;
    }

    .nav-menu.active li:nth-child(1) { animation-delay: 0.05s; }
    .nav-menu.active li:nth-child(2) { animation-delay: 0.1s; }
    .nav-menu.active li:nth-child(3) { animation-delay: 0.15s; }
    .nav-menu.active li:nth-child(4) { animation-delay: 0.2s; }
    .nav-menu.active li:nth-child(5) { animation-delay: 0.25s; }
    .nav-menu.active li:nth-child(6) { animation-delay: 0.3s; }
    .nav-menu.active li:nth-child(7) { animation-delay: 0.35s; }

    @keyframes slideIn {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .nav-menu a {
        display: block;
        padding: 18px 15px;
        font-size: var(--fz-md);
        border-bottom: 1px solid var(--navy-lightest);
        width: 100%;
    }

    .numbered-heading {
        font-size: clamp(26px, 7vw, 32px);
        margin-bottom: 40px;
    }

    .numbered-heading:before {
        font-size: clamp(16px, 5vw, 20px);
        margin-right: 10px;
    }

    .numbered-heading:after {
        display: none;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tool-category {
        padding: 24px;
    }

    .hero {
        padding: calc(var(--nav-height) + 60px) 0 60px;
        align-items: flex-start;
    }

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

    .hero-name {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        font-size: clamp(40px, 10vw, 60px);
        order: 1;
    }

    .hero-text {
        order: 2;
    }

    .big-heading {
        font-size: clamp(22px, 6vw, 28px);
    }

    .code-particle {
        font-size: 10px;
    }

    .binary-particle {
        font-size: 8px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-content {
        grid-column: 1;
        text-align: left !important;
    }

    .project-image {
        grid-column: 1;
        height: 250px;
        opacity: 1;
    }

    .project-tech-list {
        justify-content: flex-start !important;
    }

    .project-tech-list li {
        margin: 0 10px 5px 0 !important;
    }

    .project-links {
        justify-content: flex-start !important;
        margin-left: -10px !important;
        margin-right: 0 !important;
    }

    .fixed-elements {
        display: none;
    }

    .footer .social-links {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        margin-bottom: 30px;
    }

    .footer .social-links li {
        padding: 10px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-text {
        padding-right: 0;
    }

    .contact-info {
        gap: 24px;
    }

    .contact-item {
        padding: 20px;
    }

    .contact-links {
        flex-direction: column;
        gap: 12px;
    }

    .contact-links a {
        text-align: center;
    }

    .contact-actions {
        margin-top: 25px;
    }

    .cv-export-btn {
        width: 100%;
        justify-content: center;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .achievement-card {
        padding: 20px;
    }

    .achievement-header {
        gap: 12px;
    }

    .achievement-icon {
        width: 40px;
        height: 40px;
    }
}

/* General mobile overflow fixes */
@media (max-width: 768px) {
    section {
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }

    .projects-container,
    .skills-container,
    .tools-grid,
    .achievements-grid,
    .contact-content {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }

    .numbered-heading {
        max-width: 100%;
        width: 100%;
        overflow: hidden;
    }

    .numbered-heading:after {
        display: none;
    }

    .project,
    .achievement-card,
    .tool-category,
    .contact-item {
        max-width: 100%;
        width: 100%;
    }

    .project-description {
        width: 100%;
        max-width: 100%;
    }

    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    body {
        max-width: 100vw;
        overflow-x: hidden !important;
    }

    .main {
        padding: 0 20px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .nav {
        padding: 0 15px;
        max-width: 100vw;
    }

    .nav-menu {
        width: 85%;
        max-width: none;
        padding: 30px 20px;
    }

    .numbered-heading:after {
        display: none !important;
    }

    pre,
    code {
        max-width: 100%;
        overflow-x: auto;
    }

    .theme-toggle {
        padding: 6px;
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

    .numbered-heading {
        font-size: clamp(24px, 8vw, 32px);
        margin-bottom: 30px;
    }

    .numbered-heading:before {
        font-size: clamp(14px, 5vw, 18px);
        margin-right: 8px;
    }

    .numbered-heading:after {
        width: 50px;
        margin-left: 10px;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 12px;
        width: 100%;
        text-align: center;
    }

    .tech-badge {
        padding: 5px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .tech-badge img {
        width: 14px;
        height: 14px;
    }

    .project-description {
        padding: 20px;
        font-size: var(--fz-md);
    }

    .project-title {
        font-size: clamp(20px, 6vw, 24px);
    }

    .hero {
        padding: calc(var(--nav-height) + 80px) 0 40px;
    }

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

    .hero-name {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        font-size: clamp(32px, 12vw, 48px);
        order: 1;
    }

    .hero-text {
        order: 2;
    }

    .big-heading {
        font-size: clamp(18px, 6vw, 24px);
    }

    .contact-item {
        padding: 16px;
    }

    .achievement-card {
        padding: 16px;
    }

    .tool-category {
        padding: 20px;
    }

    section {
        padding: 60px 0;
    }

    .numbered-heading:after {
        width: 100%;
    }

    .big-heading {
        font-size: clamp(20px, 7vw, 26px);
        margin-bottom: 12px;
    }

    .code-particle {
        font-size: 8px;
        opacity: 0.5;
    }

    .binary-particle {
        font-size: 6px;
        opacity: 0.3;
    }

    .glitch-overlay {
        display: none;
    }

    .contact-content {
        gap: 30px;
    }

    .contact-item {
        padding: 16px;
    }

    .contact-subtitle {
        font-size: var(--fz-lg);
    }

    .contact-text p {
        font-size: var(--fz-md);
    }

    .contact-item h4 {
        font-size: var(--fz-xs);
    }

    .contact-item a,
    .contact-item span {
        font-size: var(--fz-md);
    }

    .contact-links a {
        font-size: var(--fz-sm);
        padding: 6px 12px;
    }

    .contact-actions {
        margin-top: 20px;
    }

    .cv-export-btn {
        width: 100%;
        justify-content: center;
        font-size: var(--fz-sm);
        padding: 12px 20px;
    }

    .achievement-card {
        padding: 16px;
    }

    .achievement-tech {
        margin-top: 12px;
    }

    .tech-badge-small {
        padding: 3px 6px;
    }
}