:root {
    /* Light Mode Variables */
    --bg-color: #fbfbfd;
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 2px 5px rgba(0, 0, 0, 0.04);
    --btn-bg: #1d1d1f;
    --btn-text: #ffffff;
    --btn-hover: #333336;
    --blob-1: rgba(0, 113, 227, 0.15); /* Apple blueish */
    --blob-2: rgba(217, 72, 203, 0.1);  /* Subtle pinkish */
    --highlight: #0071e3;
    
    --transition-snappy: cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* High-Contrast Dark Mode Variables */
        --bg-color: #000000;
        --text-color: #f5f5f7;
        --text-secondary: #a1a1a6;
        --card-bg: rgba(28, 28, 30, 0.5);
        --card-border: rgba(50, 50, 54, 0.5);
        --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255,255,255,0.05);
        --btn-bg: #f5f5f7;
        --btn-text: #000000;
        --btn-hover: #ffffff;
        --blob-1: rgba(0, 113, 227, 0.2);
        --blob-2: rgba(142, 58, 201, 0.15);
        --highlight: #2997ff;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs for Glassmorphism Context */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background-color: var(--blob-1);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background-color: var(--blob-2);
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
}

/* Typography */
.highlight {
    color: var(--highlight);
}

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 0 4rem;
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
        min-height: 40vh;
    }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: 400;
}

/* Projects Section */
.projects {
    padding: 4rem 0 8rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.01em;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Glassmorphism Cards */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s var(--transition-snappy), box-shadow 0.4s var(--transition-snappy);
    will-change: transform, box-shadow;
}

@media (max-width: 480px) {
    .glass {
        padding: 1.75rem;
    }
}

.glass:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--hover-shadow);
}

.project-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    display: block;
    max-width: 100%;
}

@media (max-width: 480px) {
    .project-logo {
        height: 40px;
        margin-bottom: 1.25rem;
    }
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    padding: 0.8rem 1.5rem;
    border-radius: 980px; /* Pill shape commonly used in Apple design */
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

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

.cta-button:active {
    transform: scale(0.98);
}

/* Icon Hover Micro-Interaction */
.cta-button .icon-external {
    transition: transform 0.3s var(--transition-snappy);
}
.cta-button:hover .icon-external {
    transform: translate(2px, -2px);
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUpAnim 1s var(--transition-smooth) forwards;
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--transition-smooth);
}

.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; }

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
