/* Reset & Base Styles */
:root {
    --bg-color: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-color: #2997ff;
    --accent-hover: #0071e3;
    --nav-bg: rgba(0, 0, 0, 0.8);
    --card-bg: #1d1d1f;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --transition-speed: 0.4s;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 54px;
    /* Apple nav height */
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    max-width: 980px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.logo img {
    height: 24px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.8rem;
    color: #e8e8ed;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    pointer-events: none;
    /* Allow clicks to pass through to canvas if needed, but buttons need pointer-events: auto */
}

.hero-content h1,
.hero-content p {
    pointer-events: auto;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    pointer-events: auto;
}

.btn {
    padding: 12px 24px;
    border-radius: 980px;
    /* Pill shape */
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: rgba(41, 151, 255, 0.1);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
    /* Subtle blend */
}

/* Glow Effect */
.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
}

/* Features Section */
.features-section {
    padding: 100px 20px;
    background-color: #050505;
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Portfolio Section */
.portfolio-section {
    padding: 100px 20px;
    background-color: #000;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 250px;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.app-icon-placeholder,
.placeholder-icon {
    width: 100px;
    height: 100px;
    background: #222;
    border-radius: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.app-icon {
    width: 60px;
    height: 60px;
}

.project-info {
    padding: 30px;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 10px;
}

.btn-link .arrow {
    transition: transform 0.3s ease;
}

.btn-link:hover .arrow {
    transform: translateX(5px);
}

/* About Section */
.about-section {
    padding: 100px 20px;
    background-color: #0a0a0a;
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Contact & Footer */
.contact-section {
    padding: 100px 20px;
    text-align: center;
    background: linear-gradient(to bottom, #0a0a0a, #000);
}

footer {
    background-color: #111;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.footer-logo img {
    height: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
    animation-delay: 0.5s;
}

.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Mobile Responsiveness */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

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

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

    .nav-links {
        position: fixed;
        top: 54px;
        left: 0;
        width: 100%;
        height: 0;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        transition: height 0.3s ease;
    }

    .nav-links.active {
        height: calc(100vh - 54px);
    }

    .nav-links a {
        font-size: 1.5rem;
    }
}