:root {
    /* Dark Green Theme */
    --bg-dark: #0a0e0d;
    --bg-secondary: #111816;
    --bg-card: #1a2420;
    --accent-green: #00ff87;
    --accent-green-dim: #00cc6d;
    --accent-green-glow: rgba(0, 255, 135, 0.15);
    --text-primary: #e8f5e9;
    --text-secondary: #a5d6a7;
    --text-dim: #81c784;
    --border-green: #2e7d4e;
    --glow: 0 0 20px var(--accent-green-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Syne', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

/* Custom Cursor */
body {
    cursor: none;
}

.cursor {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-green);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    mix-blend-mode: difference;
    will-change: transform;
    transform-origin: center center;
    transition: background 0.4s ease-out;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Render at 2x size, scale down to 0.5 for crisp rendering */
    transform: translate3d(0, 0, 0) scale(0.5);
}

.cursor.hover {
    background: rgba(0, 255, 135, 0.2);
    border-width: 3px;
}

.cursor-follower {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    will-change: transform;
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a, button {
    cursor: none;
}

/* Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 135, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 135, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 13, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-green);
    z-index: 1000;
    padding: 1.2rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Space Mono', monospace;
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--accent-green);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.nav-logo::before {
    content: '> ';
    color: var(--accent-green);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: var(--transition);
}

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

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 3rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.glitch-text {
    font-size: 6.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: transparent;
    position: relative;
    display: block;
    width: 100%;
    -webkit-text-stroke: 2px var(--accent-green);
    text-stroke: 2px var(--accent-green);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent-green);
    text-stroke: 2px var(--accent-green);
}

.glitch-text::before {
    animation: glitch-1 4s infinite;
    z-index: -1;
    -webkit-text-stroke: 2px var(--accent-green);
    text-stroke: 2px var(--accent-green);
}

.glitch-text::after {
    animation: glitch-2 4s infinite;
    z-index: -2;
    -webkit-text-stroke: 2px var(--accent-green-dim);
    text-stroke: 2px var(--accent-green-dim);
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-5px, 3px); }
    40% { transform: translate(-4px, -4px); }
    60% { transform: translate(4px, 3px); }
    80% { transform: translate(3px, -3px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(4px, -3px); }
    40% { transform: translate(3px, 4px); }
    60% { transform: translate(-4px, -3px); }
    80% { transform: translate(-3px, 4px); }
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--accent-green);
    margin-bottom: 2rem;
    display: inline-block;
}

.hero-subtitle::before {
    content: '$ ';
    color: var(--text-dim);
}

.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--accent-green);
    white-space: nowrap;
    animation: typing 3s steps(40) 1s 1 normal both, blink 0.7s infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: transparent;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-green);
    transition: var(--transition);
    z-index: -1;
}

.cta-button:hover {
    color: var(--bg-dark);
}

.cta-button:hover::before {
    left: 0;
}

.social-links {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.social-links a {
    color: var(--text-dim);
    font-size: 2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-green);
    transform: translateY(-5px);
    filter: drop-shadow(var(--glow));
}

/* Floating Elements */
.float-element {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent-green);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.float-element:nth-child(1) { top: 10%; right: 10%; animation-delay: 0s; }
.float-element:nth-child(2) { bottom: 20%; left: 5%; animation-delay: 2s; border-radius: 50%; }
.float-element:nth-child(3) { top: 60%; right: 20%; animation-delay: 4s; transform: rotate(45deg); }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* Section Styles */
section {
    padding: clamp(4rem, 6vw, 6rem) clamp(1.5rem, 4vw, 3rem);
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: 0.015em;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
    text-transform: none;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--accent-green);
}

.section-header p {
    font-size: 1.3rem;
    color: var(--text-dim);
    margin-top: 2rem;
}

.section-header a {
    color: var(--accent-green);
    text-decoration: none;
    font-size: 1.3rem;
    display: inline-block;
    margin-top: 1rem;
    transition: var(--transition);
}

.section-header a:hover {
    transform: translateX(5px);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-preview {
    margin-bottom: 1.5rem;
}

.about-expanded {
    margin-bottom: 1.5rem;
}

.about-toggle-wrapper {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-start;
}

.about-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.6rem;
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    background: transparent;
    color: var(--accent-green);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
}

.about-toggle .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-green);
    color: var(--bg-dark);
    transition: transform 0.3s ease;
}

.about-toggle:hover,
.about-toggle:focus {
    background: var(--accent-green);
    color: var(--bg-dark);
    outline: none;
    box-shadow: var(--glow);
}

.about-toggle:hover .toggle-icon,
.about-toggle:focus .toggle-icon {
    transform: rotate(180deg);
}

.about-toggle[aria-expanded="true"] {
    background: var(--accent-green);
    color: var(--bg-dark);
}

.about-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.highlight {
    color: var(--accent-green);
    font-weight: 600;
}

.about-visual {
    position: relative;
    height: 500px;
}

.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    border-radius: 8px;
    padding: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.code-block:hover {
    border-color: var(--accent-green);
    box-shadow: var(--glow), 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-green);
    border-radius: 8px 8px 0 0;
}

.code-block-header {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    gap: 0.5rem;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-green);
}

.code-line {
    color: var(--text-dim);
}

.code-comment {
    color: var(--text-dim);
    opacity: 0.6;
}

.code-function {
    color: var(--accent-green);
}

.code-string {
    color: var(--accent-green-dim);
}

.code-link {
    color: var(--accent-green-dim);
    text-decoration: none;
    transition: var(--transition);
}

.code-link:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Experience Cards */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.4rem;
    align-items: stretch;
}

.experience-card {
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    border-left: 3px solid var(--accent-green);
    padding: clamp(1.4rem, 2vw, 1.8rem);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 400px at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(0, 255, 135, 0.05) 0%,
        rgba(0, 255, 135, 0.025) 30%,
        transparent 70%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
    will-change: opacity, background;
}

.experience-card:hover {
    border-color: var(--accent-green);
    box-shadow: var(--glow);
    transform: translateX(10px);
}

.experience-card:hover::before {
    opacity: 1;
}

.experience-header {
    margin-bottom: 1rem;
}

.experience-title {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.experience-title h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    margin: 0;
}

.experience-title h4 {
    font-size: 1.15rem;
    color: var(--text-dim);
    font-weight: 500;
    margin: 0;
}

.experience-title h5 {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 400;
    margin: 0;
}

.experience-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-green);
    white-space: nowrap;
    margin-top: 0.2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid var(--accent-green);
    padding: 0.3rem 0.7rem;
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
    transition: var(--transition);
}

.tag:hover {
    background: var(--accent-green);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

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

.experience-card li {
    padding-left: 2rem;
    margin-bottom: 0.7rem;
    position: relative;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.experience-card li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 0.1em;
    color: var(--accent-green);
    font-size: 1.5rem;
    line-height: 1;
}

/* Skills - Balanced Professional Layout */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.skill-category {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-green);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.5;
}

.skill-tag {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: rgba(0, 255, 135, 0.06);
    border: 1px solid rgba(0, 255, 135, 0.2);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Space Mono', monospace;
    transition: var(--transition);
    line-height: 1.3;
}

.skill-tag:hover {
    background: rgba(0, 255, 135, 0.12);
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-1px);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-green);
    transform: scaleX(0);
    transition: var(--transition);
}

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

.project-card:hover::before {
    transform: scaleX(1);
}

.project-content {
    padding: clamp(1.6rem, 2.5vw, 2rem);
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    color: var(--text-primary);
    letter-spacing: 0.008em;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.project-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.project-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem 0;
}

.project-features li {
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 0.1em;
    color: var(--accent-green);
    font-size: 1.2rem;
    line-height: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    margin-left: auto;
    margin-top: 1rem;
}

.project-link:hover {
    gap: 1rem;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-green);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
    margin-top: 0.2rem;
}

/* Certificates Section */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

.certificate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    padding: clamp(1.2rem, 2vw, 1.6rem);
    text-align: center;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 300px at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(0, 255, 135, 0.05) 0%,
        rgba(0, 255, 135, 0.025) 30%,
        transparent 70%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
    will-change: opacity, background;
}

.certificate-card:hover {
    border-color: var(--accent-green);
    box-shadow: var(--glow);
    transform: translateY(-3px);
}

.certificate-card:hover::before {
    opacity: 1;
}

.certificate-icon {
    font-size: 2rem;
    color: var(--accent-green);
    margin-bottom: 0.8rem;
}

.certificate-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    margin-bottom: 0.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.certificate-card h4 {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 500;
    line-height: 1.4;
}

/* Portfolio Section */
.portfolio {
    position: relative;
}

.portfolio-intro {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-green);
    border-radius: 10px;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-intro-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-green);
}

.portfolio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-green);
    display: inline-flex;
}

.portfolio-dot:nth-child(1) {
    background: #ff5f57;
}

.portfolio-dot:nth-child(2) {
    background: #febb2e;
}

.portfolio-dot:nth-child(3) {
    background: #28c940;
}

.portfolio-file {
    margin-left: auto;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.portfolio-intro-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.portfolio-intro p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.portfolio-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.6rem;
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    background: transparent;
    color: var(--accent-green);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
}

.portfolio-toggle .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-green);
    color: var(--bg-dark);
    transition: transform 0.3s ease;
}

.portfolio-toggle:hover,
.portfolio-toggle:focus {
    background: var(--accent-green);
    color: var(--bg-dark);
    outline: none;
    box-shadow: var(--glow);
}

.portfolio-toggle:hover .toggle-icon,
.portfolio-toggle:focus .toggle-icon {
    transform: rotate(180deg);
}

.portfolio:not(.collapsed) .portfolio-toggle {
    background: var(--accent-green);
    color: var(--bg-dark);
}

.portfolio:not(.collapsed) .portfolio-toggle .toggle-icon {
    transform: rotate(180deg);
}

.portfolio-content {
    display: grid;
    gap: 2.5rem;
}

.portfolio.collapsed .portfolio-content {
    display: none;
}

.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    margin-bottom: 3rem;
}

.portfolio-filter li {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid var(--border-green);
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
}

.portfolio-filter li:hover,
.portfolio-filter li.active {
    background: var(--accent-green);
    color: var(--bg-dark);
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-green);
    transition: var(--transition);
}

.portfolio-item:hover {
    border-color: var(--accent-green);
    box-shadow: var(--glow);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

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

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-image .texts {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    transform: translateY(100%);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image .texts {
    transform: translateY(0);
}

.portfolio-image .texts h5 {
    color: var(--accent-green);
    font-size: 1.2rem;
    font-weight: 700;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal.fade.in {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-green);
    border-radius: 8px;
    padding: 0;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-green);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
}

.modal-header .modal-close-btn {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
}

.modal-title {
    color: var(--accent-green);
    font-size: 2rem;
    font-weight: 700;
}

/* Modern Close Button */
.modal-close-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10001;
}

.modal-close-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-green);
    opacity: 0;
    transition: var(--transition);
}

.modal-close-btn span {
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--accent-green);
    transition: var(--transition);
    transform-origin: center;
}

.modal-close-btn span:first-child {
    transform: rotate(45deg);
}

.modal-close-btn span:last-child {
    transform: rotate(-45deg);
}

.modal-close-btn:hover {
    border-color: var(--accent-green);
    transform: scale(1.1);
}

.modal-close-btn:hover::before {
    opacity: 0.1;
}

.modal-close-btn:hover span {
    background: var(--text-primary);
    transform: rotate(45deg) scale(1.1);
}

.modal-close-btn:hover span:last-child {
    transform: rotate(-45deg) scale(1.1);
}

.modal-body {
    padding: 2rem;
    color: var(--text-secondary);
}

.modal-body p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.modal-body a#chest {
    display: inline-block;
    color: var(--accent-green);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--accent-green);
    border-radius: 4px;
    background: rgba(0, 255, 135, 0.05);
    transition: var(--transition);
}

.modal-body a#chest:hover {
    background: rgba(0, 255, 135, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 135, 0.3);
}

.modal-body iframe {
    max-width: 100%;
    border: 1px solid var(--border-green);
    margin: 1rem 0;
}

/* Game Controls Styling */
.game-controls {
    padding-top: 1rem;
}

.game-controls p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-controls .arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid var(--accent-green);
    border-radius: 4px;
    color: var(--accent-green);
    font-size: 1.3rem;
    font-weight: 900;
    margin-right: 0.3rem;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    line-height: 1;
    /* Base text-stroke for all arrows */
    -webkit-text-stroke: 0.8px var(--accent-green);
    text-stroke: 0.8px var(--accent-green);
}

/* Make vertical arrows thinner to match horizontal ones */
.game-controls .arrow-up,
.game-controls .arrow-down {
    -webkit-text-stroke: 0.5px var(--accent-green);
    text-stroke: 0.5px var(--accent-green);
}

.game-controls .key {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid var(--accent-green);
    border-radius: 4px;
    color: var(--accent-green);
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Photo Modal Styles */
.modal-dialog-photo {
    max-width: 90%;
    width: auto;
    margin: auto;
}

.modal-content-photo {
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10002;
}

.modal-body-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-body-photo img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.photo-title {
    color: var(--accent-green);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    text-align: center;
}

/* Terminal Section */
.terminal {
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
    margin: 3rem auto;
    box-shadow: var(--glow);
}

.terminal-header {
    background: var(--bg-secondary);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-green);
}

.terminal-button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border-green);
}

.terminal-body {
    padding: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    line-height: 1.8;
}

.terminal-line {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.terminal-prompt {
    color: var(--accent-green);
}

.terminal-output {
    color: var(--text-dim);
}

.terminal-typing {
    color: var(--accent-green);
    display: inline-block;
}

.terminal-cursor {
    color: var(--accent-green);
    animation: blink-cursor 1s infinite;
    display: inline-block;
}

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

/* Contact */
.section-header.note-only {
    text-align: center;
    margin-bottom: 0;
}

.contact-note {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1.2rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-green);
    padding: 3rem;
    text-align: center;
}

footer p {
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
}

/* Responsive */
@media (max-width: 1024px) {
    .glitch-text {
        font-size: 4.5rem;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem 1.5rem;
    }
}

@media (max-width: 1250px) {
    body {
        font-size: 16px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 100px;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        padding: 2rem;
        border-top: 1px solid var(--border-green);
        transition: var(--transition);
        gap: 1.5rem;
    }

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

    .mobile-toggle {
        display: block;
    }

    .glitch-text {
        font-size: 4.5rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 7rem 1.5rem 2rem;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }

    a, button {
        cursor: pointer;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

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

    .modal-dialog-photo {
        max-width: 95%;
    }

    .modal-body-photo img {
        max-height: 80vh;
    }

    .modal-close-btn {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
    }

    .modal-close-btn span {
        width: 16px;
    }

    .game-controls .arrow {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }

    .game-controls .key {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 8rem 1rem 2rem;
    }

    .glitch-text {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-text {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    color: var(--accent-green);
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--accent-green);
    z-index: 9998;
    transition: width 0.1s ease;
}

