:root {
    /* iOS Light Theme Colors */
    --system-blue: #0A84FF;
    --background-color: #F2F2F7;
    --page-bg: #e8f0fe;
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    
    /* Liquid Glassmorphism Tokens (iOS 26 Style) */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 100%);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-border-light: rgba(255, 255, 255, 0.4);
    --glass-border-light-hover: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.5), inset 0 -1px 2px rgba(255, 255, 255, 0.1);
    --glass-blur: blur(48px) saturate(200%);
    
    --bg-gradient: linear-gradient(135deg, #e0eafc, #f4e8ff, #e0f2fe);
    --shape-1-bg: rgba(14, 165, 233, 0.65);
    --shape-2-bg: rgba(168, 85, 247, 0.55);
    --shape-3-bg: rgba(59, 130, 246, 0.55);
    --btn-secondary-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    --btn-secondary-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.dark-theme {
    --system-blue: #0A84FF;
    --background-color: #000000;
    --page-bg: #0f172a;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.12);
    --glass-border-light-hover: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -1px 2px rgba(255, 255, 255, 0.02);

    --bg-gradient: linear-gradient(135deg, #020617, #0f172a, #020617);
    --shape-1-bg: rgba(14, 165, 233, 0.4);
    --shape-2-bg: rgba(168, 85, 247, 0.3);
    --shape-3-bg: rgba(59, 130, 246, 0.3);
    --btn-secondary-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    --btn-secondary-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: var(--text-primary);
    background-color: var(--page-bg);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fluid Animated Background */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-gradient);
    transition: background 0.3s ease;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--shape-1-bg);
    top: -200px;
    left: -200px;
    transition: background 0.3s ease;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--shape-2-bg);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
    transition: background 0.3s ease;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: var(--shape-3-bg);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    transition: background 0.3s ease;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.1); }
    100% { transform: translate(-50px, 150px) scale(0.9); }
}

/* Base Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 100px;
}

section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

/* Glass Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    border-left: 1px solid var(--glass-border-light);
    box-shadow: var(--glass-shadow);
    border-radius: 32px;
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: scale(1.02);
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    width: 90%;
    max-width: 1000px;
    border-radius: 100px;
    background: var(--btn-secondary-bg);
    backdrop-filter: blur(48px) saturate(200%);
    -webkit-backdrop-filter: blur(48px) saturate(200%);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-light);
    box-shadow: var(--glass-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-brand {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.6;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background-color: rgba(128, 128, 128, 0.1);
}

.dark-theme .moon-icon {
    display: none;
}

.dark-theme .sun-icon {
    display: block !important;
}

/* Hero Section */
.hero-card {
    padding: 3rem;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    object-fit: cover;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.hero-text .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--page-bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border-light);
    border-top: 1px solid var(--glass-border-light-hover);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), inset 0 1px 1px rgba(255,255,255,0.1);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    border: 1px solid var(--glass-border-light-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    padding: 1.5rem;
}

.skill-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.skill-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image-placeholder {
    width: 100%;
    height: 180px;
    background: #e2e8f0;
}

.prj-1 { background: linear-gradient(120deg, #A1C4FD 0%, #C2E9FB 100%); }
.prj-2 { background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%); }
.prj-3 { background: linear-gradient(120deg, #fbc2eb 0%, #a6c1ee 100%); }

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.project-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    font-weight: 500;
}

.project-info .desc {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .glass-nav {
        justify-content: space-between;
    }
}

/* Contact Form */
.email-link {
    color: var(--system-blue);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.email-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.glass-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.glass-input {
    width: 100%;
    padding: 1.5rem 1.25rem 0.5rem 1.25rem;
    background: var(--btn-secondary-bg);
    border: 1px solid var(--glass-border-light);
    border-top: 1px solid var(--glass-border-light-hover);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03), inset 0 1px 1px rgba(255,255,255,0.1);
    outline: none;
}

.glass-input:focus {
    border-color: var(--system-blue);
    background: var(--btn-secondary-hover);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

.glass-label {
    position: absolute;
    top: 1.2rem;
    left: 1.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transform-origin: left top;
    transition: transform 0.2s ease, color 0.2s ease;
}

.glass-input:focus ~ .glass-label,
.glass-input:not(:placeholder-shown) ~ .glass-label {
    transform: translateY(-0.7rem) scale(0.75);
    color: var(--system-blue);
}

textarea.glass-input {
    resize: vertical;
    min-height: 120px;
}
