:root {
    --bg-color: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --card-bg: rgba(28, 28, 30, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(44, 44, 46, 0.6);
    --blue-accent: #0071e3;
    /* Classic Apple Blue */
    --nav-bg: rgba(0, 0, 0, 0.7);
    --transition-bezier: cubic-bezier(0.25, 1, 0.5, 1);
    /* MacOS standard easing */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

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

.nav-title {
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.nav-title:hover {
    opacity: 1;
}

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

.nav-links a {
    text-decoration: none;
    color: #e8e8ed;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover {
    opacity: 1;
    color: #fff;
}

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

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
}

.hero h1,
.hero p,
.hero a {
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 72px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeUp 1.2s var(--transition-bezier) forwards;
}

.hero p {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0.005em;
    color: var(--text-secondary);
    max-width: 640px;
    opacity: 0;
    animation: fadeUp 1.2s var(--transition-bezier) 0.15s forwards;
}

.cta-button {
    margin-top: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blue-accent);
    color: white;
    padding: 12px 26px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    opacity: 0;
    animation: fadeUp 1.2s var(--transition-bezier) 0.3s forwards;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover {
    transform: scale(1.03);
    background-color: #0077ed;
}

/* Bento Grid */
.bento-section {
    padding: 120px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #fff, #666);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 340px);
    /* Slightly taller for more breathing room */
    gap: 24px;
}

.bento-item {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 32px;
    transition: background 0.4s ease, transform 0.4s var(--transition-bezier);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.bento-item:hover {
    background: var(--card-hover);
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Item Specifics */
.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.item-medium {
    grid-column: span 2;
}

.item-small {
    grid-column: span 1;
}

.bento-item h3 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    z-index: 2;
}

.bento-item p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.45;
    z-index: 2;
    font-weight: 400;
}

.bento-item .icon {
    font-size: 36px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #a1a1a6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(10px);
    }

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

.project-card-hover {
    transition: transform 0.4s var(--transition-bezier), background 0.3s;
}

.project-card-hover:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .item-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .item-medium {
        grid-column: span 2;
    }

    .item-small {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 20px;
    }

    .bento-item {
        min-height: 280px;
        padding: 24px;
    }
}