:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --secondary-text: #666;
    --accent: #0070f3;
    --card-bg: #f9f9f9;
    --orb-1: rgba(0, 112, 243, 0.05);
    --orb-2: rgba(121, 40, 202, 0.03);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --bg: #121212; 
    --text: #ededed;
    --secondary-text: #b0b0b0; 
    --accent: #3291ff;
    --card-bg: #1e1e1e; 
    --orb-1: rgba(50, 145, 255, 0.05);
    --orb-2: rgba(121, 40, 202, 0.04);
}

/* --- Ambient Background --- */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg);
    transition: background-color 0.8s ease;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.orb-1 {
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, var(--orb-1) 0%, transparent 75%);
    top: -20%;
    left: -10%;
    animation: breatheOne 80s infinite ease-in-out;
}

.orb-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--orb-2) 0%, transparent 75%);
    bottom: -20%;
    right: -10%;
    animation: breatheTwo 60s infinite ease-in-out;
}

@keyframes breatheOne {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15vw, 10vh) scale(1.05); }
}

@keyframes breatheTwo {
    0%, 100% { transform: translate(0, 0) scale(1.1); }
    50% { transform: translate(-10vw, -15vh) scale(1); }
}

/* --- Animations & Visibility --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.5s; }

/* Logic for page switching */
.page-content { display: none; }
.page-content.active { display: block; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    margin: 0;
    display: flex;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.container {
    max-width: 1000px;
    width: 100%;
    padding: 40px 40px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 120px;
}

.logo {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: -0.5px;
    margin: 0;
    opacity: 0.9;
    cursor: pointer;
}

.nav-right {
    display: flex;
    gap: 24px;
    align-items: center;
}

.link-small {
    font-size: 0.7rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.link-small:hover { opacity: 0.5; }

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--text);
}

#theme-toggle svg { width: 14px; height: 14px; }

/* --- Sections --- */
.hero {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 140px;
}

.description {
    color: var(--secondary-text);
    line-height: 1.8;
    font-size: 0.9rem;
    max-width: 340px;
    text-align: right;
    margin: 0;
    font-weight: 400;
}

.section-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 30px;
    display: block;
    font-weight: 700;
}

/* --- Grid --- */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .project-grid { grid-template-columns: 1fr 1fr; }
}

.project-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid transparent;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 112, 243, 0.15);
    background: var(--bg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.02);
}

/* --- About Page Styling --- */
.about-content {
    max-width: 600px;
    margin-top: 40px;
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary-text);
    margin-bottom: 24px;
}