:root {
    --bg-color: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    --accent-gradient: linear-gradient(135deg, #0071e3, #43b0ea);
    --section-bg: #f5f5f7;
    --spacing-unit: 20px;
    --max-width: 980px;
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    /* Slower duration */
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.delay-1 {
    transition-delay: 0.2s;
    /* Slower delays */
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

/* Staggered animation for list items */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0);
}


* {
    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;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.section {
    padding: 100px 0;
}

/* Navigation */
.nav-container {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    height: 48px;
    /* Standard Apple nav height */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* 3-column grid for perfect centering */
    align-items: center;
    padding: 0 var(--spacing-unit);
    font-size: 12px;
}

.nav-left {
    display: flex;
    justify-content: flex-start;
}

.nav-center {
    display: flex;
    justify-content: center;
}

.nav-right {
    display: flex;
    justify-content: flex-end;
}

.nav-logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #1d1d1f, #434344);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 12px;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-socials {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-social-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.nav-socials a:hover .nav-social-icon {
    fill: var(--text-primary);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Subtle splash of color */
    background: radial-gradient(circle at 50% 50%, rgba(0, 113, 227, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero-title {
    font-size: 80px;
    /* Increased from 64px */
    line-height: 1.05;
    margin-bottom: 24px;
    font-weight: 700;
}

.highlight-name {
    /* Gradient text for name */
    background: linear-gradient(135deg, #1d1d1f 30%, #0071e3 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text {
    background: linear-gradient(135deg, #1d1d1f 30%, #0071e3 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 24px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: auto;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--accent-color);
    opacity: 0;
}

.scroll-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 32px;
    height: 32px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
.section-title {
    font-size: 48px;
    margin-bottom: 48px;
}

.subsection-title {
    font-size: 32px;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 400;
}

.about-visual {
    width: 100%;
    height: 400px;
    /* Fixed height for the visual frame */
    border-radius: 32px;
    /* Rounded corners to match cards */
    /* Add subtle shadow/border to frame the image */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        height: 300px;
        order: -1;
        /* Show image above text on mobile? Or below? Let's keep it below for now, default order. */
    }
}

/* Unified Projects Structure (Mobile + AI) */
.mobile-projects-section {
    background-color: #000;
    color: #fff;
    padding-bottom: 0;
    /* Subtle gradient for depth */
    background: linear-gradient(to bottom, #000000, #111111);
}

.mobile-projects-intro {
    padding-bottom: 40px;
}

.mobile-projects-content-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.project-descriptions {
    width: 45%;
    padding-top: 10vh;
    padding-bottom: 20vh;
}

.project-text-block {
    height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.project-text-block.active {
    opacity: 1;
}

.project-title {
    font-size: 40px;
    margin-bottom: 16px;
    background: linear-gradient(90deg, #fff, #a1a1a6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-desc {
    font-size: 21px;
    color: #a1a1a6;
    margin-bottom: 24px;
}

.project-tags {
    list-style: none;
    display: flex;
    gap: 12px;
}

.project-tags li {
    font-size: 14px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 980px;
    color: #fff;
}

.iphone-sticky-container {
    width: 45%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS-only iPhone Mockup */
.iphone-mockup {
    width: 300px;
    height: 600px;
    background: #1d1d1f;
    border-radius: 48px;
    padding: 12px;
    box-shadow: 0 0 0 4px #424245, 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.iphone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 28px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
    transition: width 0.3s ease;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 36px;
    overflow: hidden;
    position: relative;
}

.screen-content {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.6s ease;
}

/* AI Section (part of projects flow now) */
.ai-section {
    background-color: var(--section-bg);
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.ai-card {
    background: #fff;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 113, 227, 0.15);
    /* Blue tint shadow */
}

.ai-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.ai-card p {
    font-size: 17px;
    color: var(--text-secondary);
}

/* Skills Section */
.skills-section {
    background-color: #fff;
    padding-bottom: 50px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    font-size: 24px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e1e6;
}

/* Skill Cards */
.skill-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 113, 227, 0.1);
    border-color: rgba(0, 113, 227, 0.3);
}

/* GitHub Button */
.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    /* Subtle glass background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Low opacity border */
    color: rgba(255, 255, 255, 0.8);
    /* Soft white text */
    padding: 8px 16px;
    /* Slightly smaller padding */
    border-radius: 20px;
    /* Match tags pill shape */
    font-size: 13px;
    font-weight: 500;
    margin-top: 14px;
    /* Integrated spacing */
    width: fit-content;
    /* Prevent stretching in flex container */
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.github-btn:hover {
    transform: translateY(-1px);
    background-color: rgba(0, 113, 227, 0.15);
    /* Blue tint on hover */
    border-color: #0071e3;
    /* Accent blue border */
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.github-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    /* Inherit color */
    transition: fill 0.3s ease;
}

.skill-card h3 {
    font-size: 24px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.skill-list li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin-right: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 80px 0;
    background: #fff;
    border-top: 1px solid #e1e1e6;
}

.footer-title {
    font-size: 40px;
    margin-bottom: 16px;
}

.footer-email {
    font-size: 24px;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.social-links {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 32px;
}

.social-links a {
    color: #86868b;
    /* Monochrome initially */
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: #1d1d1f;
    /* Darker on hover */
    transform: scale(1.1);
}

.social-icon {
    width: 28px;
    height: 28px;
}

.copyright {
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .mobile-projects-content-wrapper {
        flex-direction: column;
    }

    .iphone-sticky-container {
        position: relative;
        height: auto;
        margin-bottom: 40px;
        top: auto;
    }

    .project-descriptions {
        width: 100%;
        padding-top: 0;
    }

    .project-text-block {
        height: auto;
        margin-bottom: 60px;
        opacity: 1;
    }

    .iphone-mockup {
        width: 260px;
        height: 520px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 40px;
    }
}

/* Specific button style for AI cards (White background) */
.ai-card .github-btn {
    background-color: rgba(0, 113, 227, 0.1);
    border-color: rgba(0, 113, 227, 0.2);
    color: #0071e3;
    width: fit-content;
}

.ai-card .github-btn svg {
    fill: #0071e3;
}

.ai-card .github-btn:hover {
    background-color: #0071e3;
    color: #fff;
    border-color: #0071e3;
}

.ai-card .github-btn:hover svg {
    fill: #fff;
}