:root {
    --bg: #050505;
    --surface: #111111;
    --surface-2: #1a1a1a;
    --surface-3: #222222;
    --primary: #6D28D9;
    --primary-glow: #8B5CF6;
    --primary-dark: #4C1D95;
    --secondary: #2563EB;
    --secondary-glow: #60A5FA;
    --accent: #FFD700;
    --accent-glow: #FFE44D;
    --text: #FFFFFF;
    --text-secondary: #D4D4D8;
    --muted: #A1A1AA;
    --border: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(109, 40, 217, 0.3);
    --glass-bg: rgba(17, 17, 17, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg);
    font-size: 16px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ CANVAS HERO BACKGROUND ============ */
#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ============ NAVIGATION ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: var(--transition-slow);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.nav.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 0.7rem 2rem;
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
}

.nav-logo .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.5);
}

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

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
    position: relative;
    font-family: var(--font-body);
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-glow);
    border-radius: 2px;
    transition: var(--transition);
    box-shadow: 0 0 10px var(--primary-glow);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    padding: 0.6rem 1.4rem !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.03em;
    transition: var(--transition) !important;
    box-shadow: 0 0 25px rgba(109, 40, 217, 0.4);
    text-decoration: none;
}

.nav-cta:hover {
    box-shadow: 0 0 40px rgba(109, 40, 217, 0.7);
    transform: translateY(-2px);
    color: #fff !important;
}

.nav-cta::after {
    display: none !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 8px;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        transition: var(--transition-slow);
        border-left: 1px solid var(--border);
    }

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

    .hamburger {
        display: flex;
    }
}

/* ============ HERO SECTION ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 2rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 2;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--border-glow);
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--primary-glow);
    margin-bottom: 2rem;
    background: rgba(109, 40, 217, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: pulseBadge 3s ease-in-out infinite;
}

@keyframes pulseBadge {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(109, 40, 217, 0.3);
    }

    50% {
        box-shadow: 0 0 35px rgba(109, 40, 217, 0.7);
    }
}

.hero h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 0.3rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #D4D4D8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .accent-dot {
    -webkit-text-fill-color: var(--accent);
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 0 30px rgba(109, 40, 217, 0.5);
}

.btn-primary:hover {
    box-shadow: 0 0 50px rgba(109, 40, 217, 0.8);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-glow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--primary-glow);
    box-shadow: 0 0 25px rgba(109, 40, 217, 0.4);
    transform: translateY(-3px);
    background: rgba(109, 40, 217, 0.08);
}

.btn-sm {
    padding: 0.55rem 1.3rem;
    font-size: 0.8rem;
    border-radius: 40px;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none;
    box-shadow: none;
}

/* ============ SECTION STYLES ============ */
.section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--primary-glow);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(109, 40, 217, 0.3);
    border-radius: 50px;
    background: rgba(109, 40, 217, 0.05);
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-desc {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ CARD GRID SYSTEM ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-slow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 40px rgba(109, 40, 217, 0.15);
    transform: translateY(-4px);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

.project-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
    padding: 1.3rem 1.5rem 0.3rem 1.5rem;
    color: var(--text);
    margin: 0;
}

.project-card h4.status-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    margin: 0.3rem 1.5rem 0.5rem 1.5rem;
    width: fit-content;
    font-weight: 600;
    text-transform: uppercase;
}

.project-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0 1.5rem;
    flex: 1;
    margin-bottom: 1rem;
}

.project-card .card-action {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    margin-top: auto;
}

/* Hide meta tags - they shouldn't display */
meta {
    display: none !important;
}

/* Ensure proper spacing in project cards */
.project-card h3 {
    margin-top: 0;
}

.project-card h4.status-badge {
    margin-top: 0.3rem;
}

/* Status badge colors */
.status-released {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-playable {
    background: rgba(37, 99, 235, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.status-dev {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.status-beta {
    background: rgba(168, 85, 247, 0.15);
    color: #A855F7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-coming {
    background: rgba(251, 146, 60, 0.15);
    color: #FB923C;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.status-concept {
    background: rgba(236, 72, 153, 0.15);
    color: #EC4899;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.status-research {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }
}

/* ============ FOUNDER SECTION ============ */
.founder-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.founder-section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.1) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.founder-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.founder-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 3rem;
    box-shadow: 0 0 50px rgba(109, 40, 217, 0.5);
    flex-shrink: 0;
}

.founder-quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
}

.founder-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.founder-desc {
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .founder-section {
        padding: 2rem;
    }

    .founder-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .founder-avatar {
        margin: 0 auto;
    }

    .founder-quote {
        padding-left: 0;
        border-left: none;
        border-top: 3px solid var(--primary);
        padding-top: 1.5rem;
    }
}

/* ============ TIMELINE ============ */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary), transparent);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.7);
    border: 2px solid var(--bg);
    transform: translateX(-50%);
}

.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--primary-glow);
    margin-bottom: 0.3rem;
}

.timeline-title {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============ ABOUT SECTION ============ */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    color: var(--text);
}

.about-content h3:first-child {
    margin-top: 0;
}

.about-content p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ============ CONTACT SECTION ============ */
.contact-links-centered {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.8rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

.contact-link:hover {
    border-color: var(--primary-glow);
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.2);
    background: var(--surface-3);
    transform: translateY(-2px);
}

.contact-link .link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .contact-links-centered {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        min-width: 180px;
    }
}

/* ============ FOOTER ============ */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.footer-secondary {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--muted);
    opacity: 0.7;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .section {
        padding: 4.5rem 1.5rem;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.2rem;
    }
}

@media (max-width: 968px) {
    .section {
        padding: 4rem 1.2rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 6vw, 4rem);
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }

    .founder-section {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
        min-height: auto;
        padding-top: 100px;
    }

    .hero-content {
        animation: heroFadeIn 0.8s ease-out;
    }

    .hero h1 {
        font-size: clamp(2rem, 7vw, 3rem);
        letter-spacing: -0.01em;
    }

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

    .hero-buttons {
        gap: 0.8rem;
    }

    .btn {
        flex: 1;
        min-width: 140px;
    }

    .nav {
        padding: 0.7rem 1rem;
    }

    .section {
        padding: 3.5rem 1.5rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

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

    .project-card {
        border-radius: 12px;
    }

    .project-card h3 {
        font-size: 1.15rem;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 15px;
    }

    .hero {
        padding: 1rem;
        padding-top: 90px;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.8rem;
        margin-bottom: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        justify-items: center;
        align-items: center;
        flex-direction: column;
        gap: 0.6rem;
        height: auto;

    }

    .btn {
        width: 100%;
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }

    .nav {
        padding: 0.6rem 1rem;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .nav-logo .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .section {
        padding: 2.5rem 1rem;
    }

    .section-label {
        font-size: 0.65rem;
        padding: 0.3rem 0.7rem;
        margin-bottom: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .section-desc {
        font-size: 0.95rem;
    }

    .project-card {
        border-radius: 10px;
    }

    .project-card h3 {
        font-size: 1rem;
        padding: 1rem 1.2rem 0 1.2rem;
    }

    .project-card h4.status-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
        margin: 0.2rem 1.2rem 0.4rem 1.2rem;
    }

    .project-card p {
        font-size: 0.85rem;
        padding: 0 1.2rem;
        margin-bottom: 0.8rem;
    }

    .project-card .card-action {
        padding: 0.3rem 1.2rem 1.2rem 1.2rem;
    }

    .founder-section {
        padding: 1.5rem;
    }

    .founder-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.2rem;
    }

    .founder-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.2rem;
        margin: 0 auto;
    }

    .founder-quote {
        font-size: 1rem;
        padding-top: 1.2rem;
        border-top: 2px solid var(--primary);
    }

    .founder-name {
        font-size: 1.2rem;
    }

    .founder-desc {
        font-size: 0.9rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-item::before {
        left: -2.5rem;
        width: 10px;
        height: 10px;
    }

    .about-content h3 {
        font-size: 1.2rem;
        margin-top: 1.8rem;
    }

    .about-content p {
        font-size: 0.9rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-tagline {
        font-size: 0.9rem;
    }

    .footer-secondary {
        font-size: 0.75rem;
    }

    .footer-copy {
        font-size: 0.7rem;
    }

    .contact-links-centered {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-link {
        padding: 0.9rem 1.5rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

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

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .project-card h3 {
        font-size: 0.95rem;
    }

    .timeline {
        padding-left: 1.8rem;
    }

    .timeline-item {
        margin-bottom: 2rem;
        padding-left: 1.5rem;
    }
}

/* ============ CORE WEB VITALS OPTIMIZATION ============ */

/* Largest Contentful Paint (LCP) Optimization */
img {
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
}

.project-card img {
    object-fit: cover;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

/* Cumulative Layout Shift (CLS) Prevention */
.hero-badge,
.btn,
.project-card,
.section {
    contain: layout;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    contain: layout style paint;
    font-display: swap;
}

/* First Input Delay (FID) / Interaction to Next Paint (INP) Optimization */
.btn,
.contact-link,
.nav-links a,
button {
    contain: strict;
    will-change: transform, box-shadow;
}

.btn:active,
.contact-link:active,
.nav-links a:active {
    height: 50px;
    width: 150px;
}

/* Reduce repaints for animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .btn:hover {
        transform: none;
    }

    #contact-link:hover {
        transform: none;
    }
}

/* Optimize touch targets for mobile */
@media (max-width: 768px) {

    .btn,
    .nav-links a,
    button {

        height: 48px;
        width: 48px;
    }

    #contact-link {
        width: 150px;
    }
}

/* Image optimization for different devices */
@media (max-width: 600px) {
    img {
        max-width: 100%;
        height: auto;
    }

    .project-card img {
        aspect-ratio: auto;
        width: 100%;
    }

    .contact-links-centered {
        flex-direction: column;
        gap: 1rem;

    }
}

/* Reduce bandwidth usage on slow networks */
@media (prefers-reduced-data: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    img {
        background-color: var(--surface-2);
    }
}

/* Light mode support for better accessibility */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #FAFAFA;
        --surface: #FFFFFF;
        --text: #000000;
        --text-secondary: #333333;
        --muted: #666666;
        --border: rgba(0, 0, 0, 0.08);
    }

    body {
        color-scheme: light;
    }
}

@media screen and (min-width: 768px) and (max-width: 1700px) {

    .btn,
    .nav-links a,
    button {

        height: 50px;
        min-width: 150px;
    }

    #contact-link {
        width: 100px;
    }
}