:root {
    --bg-main: #0a0a0a;
    --bg-sec: #111111;
    --text-main: #f4f4f5;
    --text-mut: #a1a1aa;
    --primary: #00ffcc;
    --primary-dim: rgba(0, 255, 204, 0.1);
    --border: #27272a;
    --glass: rgba(10, 10, 10, 0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: system-ui, -apple-system, sans-serif; }
body { background: var(--bg-main); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.bg-alt { background: var(--bg-sec); }
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

/* Typography */
h1, h2, h3, h4 { color: #fff; font-weight: 700; line-height: 1.2; }
.hero-title { font-size: clamp(3rem, 8vw, 5rem); letter-spacing: -1px; }
.hero-subtitle { color: var(--primary); font-size: clamp(1.2rem, 3vw, 1.8rem); margin-bottom: 20px; font-weight: 500; }
.hero-text { color: var(--text-mut); font-size: 1.1rem; max-width: 600px; margin-bottom: 30px; }
.section-title { font-size: 2.5rem; margin-bottom: 40px; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary); margin-top: 10px; }
.section-subtitle { color: var(--text-mut); margin-top: -30px; margin-bottom: 40px; font-size: 1.1rem; }

/* Nav */
nav { position: fixed; top: 0; width: 100%; background: var(--glass); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid var(--border); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.brand-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.dot { color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--text-mut); transition: color 0.3s; }
.nav-link:hover, .nav-link.active { color: #fff; }
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; padding: 12px 24px; border-radius: 6px; font-weight: 600; font-size: 0.95rem; transition: all 0.3s ease; cursor: pointer; }
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: #00d6ab; transform: translateY(-2px); }
.btn-secondary { background: #fff; color: #000; }
.btn-secondary:hover { background: #e4e4e7; transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--border); color: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-resume { border: 1px solid var(--primary); color: var(--primary); padding: 8px 16px; border-radius: 4px; font-weight: 600; }
.btn-resume:hover { background: var(--primary-dim); }

/* About & Matrix */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-text p { margin-bottom: 20px; font-size: 1.1rem; color: var(--text-mut); }
.rizz-matrix { background: var(--bg-main); border: 1px solid var(--border); padding: 30px; border-radius: 12px; }
.matrix-sub { font-size: 0.9rem; color: var(--text-mut); margin-bottom: 15px; }
.matrix-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; font-size: 0.85rem; color: var(--text-mut); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { background: var(--bg-main); border: 1px solid var(--border); border-radius: 12px; padding: 30px; transition: transform 0.3s, border-color 0.3s; }
.project-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.project-category { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); font-weight: 600; }
.project-title { margin: 10px 0 15px; font-size: 1.4rem; }
.project-content p { color: var(--text-mut); font-size: 0.95rem; margin-bottom: 20px; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.tech-stack span { font-size: 0.8rem; padding: 4px 10px; background: var(--bg-sec); border: 1px solid var(--border); border-radius: 4px; color: var(--text-mut); }
.project-links { display: flex; gap: 15px; }

/* Tools Directory */
.tool-filters { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn { background: transparent; border: 1px solid var(--border); color: var(--text-mut); padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: 0.3s; }
.filter-btn.active, .filter-btn:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.tool-item { display: block; background: var(--bg-sec); border: 1px solid var(--border); padding: 20px; border-radius: 8px; font-weight: 500; transition: 0.3s; }
.tool-item:hover { border-color: var(--primary); color: var(--primary); transform: translateX(5px); }

/* Layouts & Timeline */
.two-col-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-tag { background: var(--primary-dim); color: var(--primary); padding: 10px 18px; border-radius: 6px; font-weight: 500; font-size: 0.95rem; }
.timeline { border-left: 2px solid var(--border); padding-left: 30px; }
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item::before { content: ''; position: absolute; left: -37px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); }
.timeline-item h4 { margin-bottom: 5px; }
.timeline-item p { color: var(--text-mut); font-size: 0.95rem; }

/* Ecosystem */
.ecosystem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.eco-card { text-align: center; padding: 30px 20px; background: var(--bg-sec); border: 1px solid var(--border); border-radius: 12px; transition: 0.3s; }
.eco-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.eco-card h3 { font-size: 1.1rem; margin-bottom: 5px; }
.eco-card p { color: var(--text-mut); font-size: 0.85rem; }

/* Footer & Social */
.social-links { display: flex; justify-content: center; gap: 20px; }
.social-links a { color: var(--text-mut); transition: color 0.3s; }
.social-links a:hover { color: var(--primary); }
footer { padding: 40px 0; border-top: 1px solid var(--border); text-align: center; background: var(--bg-main); font-size: 0.9rem; color: var(--text-mut); }
.footer-legal { margin-bottom: 15px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.footer-legal a:hover { color: #fff; }

.back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--border); color: #fff; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.3s; pointer-events: none; z-index: 99; }
.back-to-top.visible { opacity: 1; pointer-events: all; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Mobile Responsive */
@media (max-width: 900px) {
    .about-grid, .two-col-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { position: absolute; top: 70px; left: 0; width: 100%; background: var(--bg-main); flex-direction: column; padding: 20px 0; gap: 20px; border-bottom: 1px solid var(--border); clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: clip-path 0.4s ease; }
    .nav-links.nav-active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .mobile-toggle { display: block; }
    .hero-title { font-size: 2.5rem; }
    .matrix-list { grid-template-columns: 1fr; }
}

/* =========================================
   A4 PDF FORMAT & PRINT STYLES (NO ERROR)
   ========================================= */
@media print {
    body { background: #fff; color: #000; font-size: 12pt; }
    nav, .hero-buttons, .tool-filters, .back-to-top, .footer-legal { display: none !important; }
    .container { width: 100%; max-width: none; padding: 0; margin: 0; }
    .section { padding: 20px 0; page-break-inside: avoid; }
    h1, h2, h3, h4 { color: #000; }
    .section-title::after { background: #000; }
    .bg-alt { background: #fff; }
    
    /* Reformat for A4 */
    @page { size: A4; margin: 1.5cm; }
    .project-card, .eco-card, .tool-item, .rizz-matrix { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; color: #000; background: #fff; }
    .tool-item { display: inline-block; width: 30%; margin: 1%; padding: 10px; font-size: 10pt; }
    .tech-stack span, .skill-tag { background: #f0f0f0; border: 1px solid #ccc; color: #000; }
    .timeline-item::before { background: #000; }
    
    /* Ensure links print clearly */
    a { text-decoration: none; color: #000; }
}
