/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0a0e17;
    --bg-subtle: #111827;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;
    --radius: 20px;
    --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Canvas ===== */
#bg-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.6);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    gap: 3rem; padding: 0.75rem 2rem;
}

.nav-logo {
    font-size: 1.5rem; font-weight: 700;
    color: var(--text); text-decoration: none;
    letter-spacing: -0.03em;
}

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

.nav-link {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.875rem; font-weight: 500;
    transition: color 0.3s; padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

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

.hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); 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);
}

.mobile-menu {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999; background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2rem;
}

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

.mobile-link {
    color: var(--text-muted); text-decoration: none;
    font-size: 1.5rem; font-weight: 500;
    transition: color 0.3s;
}

.mobile-link:hover, .mobile-link.active { color: var(--accent); }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
}

/* ===== Glass Cards — Fully Transparent ===== */
.glass-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 3rem;
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.glass-card.visible { opacity: 1; transform: translateY(0); }

/* ===== Hero ===== */
.hero-section {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 2rem 4rem;
}

.hero-container {
    display: flex; align-items: center; justify-content: center; gap: 4rem;
    max-width: 1100px; width: 100%;
}

.hero-card {
    max-width: 800px;
    text-align: center; padding: 3.5rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text {
    font-size: 1.5rem; font-weight: 400;
    color: var(--text-muted); margin-bottom: 1.5rem;
    min-height: 2rem;
}

.role-typed { color: var(--accent); font-weight: 500; }

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.tagline {
    font-size: 1rem; color: var(--text-muted);
    margin-bottom: 2rem; max-width: 500px; line-height: 1.6;
    margin-left: auto; margin-right: auto;
}

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

.hero-decoration {
    flex-shrink: 0; width: 280px; height: 280px;
    opacity: 0.6;
    animation: spin-slow 30s linear infinite;
}

@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .hero-container { text-align: center; }
    .hero-ctas { justify-content: center; }
}

/* ===== CTA Buttons ===== */
.cta-btn {
    display: inline-block; text-decoration: none;
    font-size: 0.875rem; font-weight: 500;
    letter-spacing: 0.03em; padding: 0.75rem 1.75rem;
    border-radius: 100px; transition: var(--transition);
}

.cta-btn.primary {
    background: var(--accent); color: #fff;
}
.cta-btn.primary:hover { background: #5558e6; transform: translateY(-1px); }

.cta-btn.secondary {
    color: var(--accent); border: 1px solid rgba(99, 102, 241, 0.3);
}
.cta-btn.secondary:hover { background: rgba(99, 102, 241, 0.1); border-color: var(--accent); }

/* ===== Teaser ===== */
.teaser-section {
    padding: 0 2rem 6rem; display: flex; justify-content: center;
}

.teaser-card {
    max-width: 700px; text-align: center; padding: 2.5rem;
}

.teaser-card p {
    color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1rem;
}

/* ===== Page sections ===== */
.page-section {
    min-height: 80vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 7rem 2rem 4rem;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem); font-weight: 700;
    letter-spacing: -0.02em; margin-bottom: 2rem; text-align: center;
}

.page-card { max-width: 700px; width: 100%; }

.page-card h1 {
    font-size: 2rem; font-weight: 600; margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.page-card p { color: var(--text-muted); margin-bottom: 1rem; font-size: 1rem; }

/* ===== Services ===== */
.section-title {
    font-size: 0.875rem; font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--accent);
    margin-bottom: 2.5rem; text-align: center;
}

.services-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; max-width: 900px; width: 100%;
}

.service-card {
    text-align: center; padding: 2rem 1.5rem;
    transition: var(--transition), border-color 0.3s;
}

.service-card:hover { border-color: rgba(99, 102, 241, 0.2); }

.service-icon { font-size: 2rem; margin-bottom: 1rem; }

.service-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }

.service-card p { font-size: 0.85rem; color: var(--text-muted); }

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

/* ===== Tech Stack ===== */
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

.tag {
    display: inline-block; padding: 0.35rem 0.85rem;
    font-size: 0.75rem; font-weight: 500; color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.25); border-radius: 100px;
    letter-spacing: 0.02em;
}

/* ===== Projects ===== */
.search-bar { max-width: 500px; width: 100%; padding: 1rem 1.5rem; margin-bottom: 1.5rem; }

.search-input {
    width: 100%; background: none; border: none;
    color: var(--text); font-size: 1rem; font-family: inherit;
    outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.filters {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    justify-content: center; margin-bottom: 2.5rem;
    max-width: 900px; width: 100%;
}

.filter-btn {
    padding: 0.5rem 1.25rem; font-size: 0.8rem; font-weight: 500;
    color: var(--text-muted); background: transparent;
    border: 1px solid var(--glass-border); border-radius: 100px;
    cursor: pointer; transition: var(--transition); font-family: inherit;
}

.filter-btn:hover { border-color: var(--accent); color: var(--text); }

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

.projects-grid {
    display: grid; grid-template-columns: 1fr; gap: 1.25rem;
    max-width: 900px; width: 100%;
}

@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }

.project-card {
    max-width: none; transition: var(--transition), border-color 0.3s;
}

.project-card:hover { border-color: rgba(99, 102, 241, 0.2); }

.project-header { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 1rem; }

.project-link { color: var(--text-muted); text-decoration: none; font-size: 1.1rem; transition: color 0.3s; }
.project-link:hover { color: var(--accent); }

.project-card h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }

.project-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.5; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.load-more-wrap { text-align: center; margin-top: 2rem; }

/* ===== Contact ===== */
.contact-page-card { text-align: center; max-width: 600px; }

.contact-links {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 1rem; margin-top: 2rem;
}

.contact-item {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
    padding: 0.6rem 1.2rem; border: 1px solid var(--glass-border);
    border-radius: 100px; transition: var(--transition);
}

.contact-item:hover { color: var(--text); border-color: rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.05); }

.contact-icon { font-size: 1rem; color: var(--accent); }

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.contact-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
    .page-section { padding: 5rem 1.25rem 3rem; }
    .glass-card { padding: 2rem; }
    .hero-card { padding: 2rem; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .glass-card { opacity: 1; transform: none; }
}
