/* ===== VARIABLES - iOS DESIGN SYSTEM ===== */
:root {
    /* iOS Light Theme Colors */
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --accent-color: #FF3B30;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --text-color: #000000;
    --text-color-light: #8E8E93;
    --text-color-secondary: #6C6C70;
    --background-color: #F2F2F7;
    --background-elevated: #FFFFFF;
    --background-alt: #FFFFFF;
    --background-secondary: #F9F9F9;
    --border-color: rgba(60, 60, 67, 0.12);
    --separator-color: rgba(60, 60, 67, 0.29);
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-elevated: rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #6EB5FF 0%, #B5A8FF 100%); /* softer pastel take on iOS blue/purple */
    --gradient-primary-strong: linear-gradient(135deg, #007AFF 0%, #5856D6 100%); /* keep strong gradient for accents */
    --gradient-mesh: linear-gradient(135deg, rgba(110, 181, 255, 0.15) 0%, rgba(181, 168, 255, 0.15) 100%);
    --gradient-pastel-overlay: radial-gradient(1200px 800px at 80% 10%, rgba(110,181,255,0.15) 0%, rgba(181,168,255,0.12) 35%, rgba(255,173,173,0.08) 60%, rgba(255,255,255,0) 70%);
    
    /* iOS Typography Scale */
    --font-size-caption2: 0.6875rem;      /* 11px */
    --font-size-caption1: 0.75rem;        /* 12px */
    --font-size-footnote: 0.8125rem;      /* 13px */
    --font-size-subheadline: 0.9375rem;   /* 15px */
    --font-size-body: 1.0625rem;          /* 17px */
    --font-size-callout: 1rem;            /* 16px */
    --font-size-headline: 1.0625rem;      /* 17px */
    --font-size-title3: 1.25rem;          /* 20px */
    --font-size-title2: 1.375rem;         /* 22px */
    --font-size-title1: 1.75rem;          /* 28px */
    --font-size-large-title: 2.125rem;    /* 34px */
    
    /* iOS Spacing System (8pt grid) */
    --spacing-2: 0.125rem;   /* 2px */
    --spacing-4: 0.25rem;    /* 4px */
    --spacing-8: 0.5rem;     /* 8px */
    --spacing-12: 0.75rem;   /* 12px */
    --spacing-16: 1rem;      /* 16px */
    --spacing-20: 1.25rem;   /* 20px */
    --spacing-24: 1.5rem;    /* 24px */
    --spacing-32: 2rem;      /* 32px */
    --spacing-40: 2.5rem;    /* 40px */
    --spacing-48: 3rem;      /* 48px */
    --spacing-64: 4rem;      /* 64px */
    
    /* iOS Border Radius */
    --radius-small: 0.5rem;    /* 8px */
    --radius-medium: 0.75rem;  /* 12px */
    --radius-large: 0.75rem;   /* 12px - refined to iOS proportion */
    --radius-xlarge: 1.25rem;  /* 20px */
    --radius-xxlarge: 1.75rem; /* 28px */
    --radius-full: 50%;
    
    /* iOS Transitions */
    --transition-swift: 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* iOS Blur & Effects */
    --blur-light: blur(20px);
    --blur-medium: blur(40px);
    --blur-heavy: blur(60px);
}

/* Dark Theme - iOS Style */
[data-theme="dark"] {
    --primary-color: #0A84FF;
    --secondary-color: #5E5CE6;
    --accent-color: #FF453A;
    --success-color: #32D74B;
    --warning-color: #FF9F0A;
    --text-color: #FFFFFF;
    --text-color-light: #98989D;
    --text-color-secondary: #8E8E93;
    --background-color: #000000;
    --background-elevated: #1C1C1E;
    --background-alt: #1C1C1E;
    --background-secondary: #2C2C2E;
    --border-color: rgba(255, 255, 255, 0.08);
    --separator-color: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-elevated: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #5AA0FF 0%, #9B92FF 100%); /* pastel in dark too */
    --gradient-primary-strong: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
    --gradient-mesh: linear-gradient(135deg, rgba(90, 160, 255, 0.18) 0%, rgba(155, 146, 255, 0.18) 100%);
    --gradient-pastel-overlay: radial-gradient(1200px 800px at 80% 10%, rgba(90,160,255,0.18) 0%, rgba(155,146,255,0.18) 35%, rgba(255,153,153,0.08) 60%, rgba(0,0,0,0) 70%);
}

/* ===== RESET & BASE STYLES - iOS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* iOS inertial scrolling */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-swift), opacity var(--transition-swift);
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    opacity: 0.8;
}

a:active {
    opacity: 0.6;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Accessible skip link */
.skip-link:focus {
    position: fixed !important;
    left: 16px !important;
    top: 16px !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 14px;
    z-index: 2000;
    background: var(--background-elevated);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-medium);
    box-shadow: 0 6px 20px var(--shadow-color);
}

button, input, textarea {
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-24);
}

.section {
    padding: var(--spacing-64) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-48);
}

.section-header h2 {
    font-size: var(--font-size-large-title);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-12);
    color: var(--text-color);
    line-height: 1.15;
    text-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.underline {
    height: 3px;
    width: 60px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: var(--radius-full);
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* iOS-Style Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-12) var(--spacing-24);
    border-radius: var(--radius-medium);
    font-size: var(--font-size-body);
    font-weight: 600;
    letter-spacing: -0.022em;
    cursor: pointer;
    transition: all var(--transition-swift);
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    min-height: 44px; /* iOS touch target */
    min-width: 44px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity var(--transition-swift);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.96);
}

.primary-btn {
    background: var(--gradient-primary-strong);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.primary-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: color-mix(in oklab, var(--background-elevated), var(--primary-color) 2%);
    color: var(--primary-color);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.secondary-btn:hover {
    background-color: var(--background-secondary);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px var(--shadow-color);
    transform: translateY(-2px);
}

/* ===== NAVBAR - iOS STYLE ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(242, 242, 247, 0.65);
    backdrop-filter: var(--blur-light);
    -webkit-backdrop-filter: var(--blur-light);
    border-bottom: 0.5px solid var(--separator-color);
    transition: all var(--transition-smooth);
}

[data-theme="dark"] .navbar {
    background-color: rgba(28, 28, 30, 0.8);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-16) var(--spacing-24);
    max-height: 64px;
}

.logo h1 {
    font-size: var(--font-size-title2);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.nav-menu li {
    margin-left: var(--spacing-8);
}

.nav-link {
    color: var(--text-color);
    font-size: var(--font-size-body);
    font-weight: 500;
    letter-spacing: -0.022em;
    position: relative;
    padding: var(--spacing-8) var(--spacing-12);
    border-radius: var(--radius-medium);
    transition: all var(--transition-swift);
    min-height: 44px; /* touch target */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-swift);
}

.nav-link:hover {
    background-color: rgba(0, 122, 255, 0.08);
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 24px;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 122, 255, 0.12);
}

.theme-btn {
    background: var(--background-elevated);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: var(--font-size-body);
    color: var(--text-color);
    width: 44px;
    height: 44px; /* iOS touch target */
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-swift);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.theme-btn:hover {
    background-color: var(--background-secondary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-btn:active {
    transform: scale(0.95);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--background-elevated);
    border-radius: var(--radius-small);
    padding: var(--spacing-4);
}

.menu-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px auto;
    background-color: var(--text-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-swift);
}

/* Navbar Scroll Effect */
.navbar.scrolled {
    background-color: rgba(242, 242, 247, 0.95);
    box-shadow: 0 2px 16px var(--shadow-color);
}

[data-theme="dark"] .navbar.scrolled {
    background-color: rgba(28, 28, 30, 0.95);
}

/* ===== PARTICLES BACKGROUND ===== */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ===== HERO SECTION - iOS STYLE ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--background-color);
    overflow: hidden;
    padding-top: 60px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: var(--gradient-mesh);
    border-radius: 0 0 0 50%;
    opacity: 0.5;
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-64);
    position: relative;
    z-index: 10;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: var(--spacing-16);
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hero-content h2 {
    font-size: var(--font-size-title1);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-16);
    color: var(--text-color-secondary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.hero-content p {
    font-size: var(--font-size-body);
    line-height: 1.5;
    margin-bottom: var(--spacing-32);
    color: var(--text-color-light);
    letter-spacing: -0.022em;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-16);
    margin-bottom: var(--spacing-32);
    flex-wrap: wrap;
}

.social-icons {
    display: flex;
    gap: var(--spacing-12);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-medium);
    background-color: var(--background-elevated);
    color: var(--primary-color);
    font-size: 1.125rem;
    transition: all var(--transition-swift);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.social-link:hover {
    transform: translateY(-4px) scale(1.05);
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    border-color: transparent;
}

.social-link:active {
    transform: translateY(-2px) scale(1.02);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: floatAnimation 6s ease-in-out infinite;
}

.profile-container {
    width: 340px;
    height: 340px;
    position: relative;
}

.profile-circle {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xxlarge);
    overflow: hidden;
    border: 3px solid var(--background-elevated);
    background: var(--background-elevated);
    transition: all var(--transition-smooth);
    position: relative;
    z-index: 2;
    box-shadow: 0 16px 48px var(--shadow-elevated),
                0 0 0 1px var(--border-color);
}

.profile-circle::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-xxlarge);
    padding: 3px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.profile-circle:hover::before {
    opacity: 1;
}

.profile-circle:hover {
    transform: scale(1.02);
    box-shadow: 0 24px 64px var(--shadow-elevated),
                0 0 0 1px var(--primary-color);
}

/* ===== ABOUT SECTION - iOS STYLE ===== */
.about {
    background-color: var(--background-color);
}

.about-content {
    display: flex;
    gap: var(--spacing-48);
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: var(--font-size-title1);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-20);
    color: var(--text-color);
}

.about-text p {
    margin-bottom: var(--spacing-20);
    color: var(--text-color-light);
    font-size: var(--font-size-body);
    line-height: 1.5;
    letter-spacing: -0.022em;
}

.about-buttons {
    margin-top: var(--spacing-32);
}

.about-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-16);
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-16);
    padding: var(--spacing-20);
    background-color: var(--background-elevated);
    border-radius: var(--radius-medium);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all var(--transition-swift);
}

.detail-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-elevated);
    border-color: rgba(0, 122, 255, 0.3);
}

.detail-item i {
    font-size: var(--font-size-title2);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.1);
    border-radius: var(--radius-medium);
    flex-shrink: 0;
}

.detail-item h4 {
    font-size: var(--font-size-callout);
    font-weight: 600;
    letter-spacing: -0.022em;
    margin-bottom: var(--spacing-4);
    color: var(--text-color);
}

.detail-item p {
    font-size: var(--font-size-footnote);
    color: var(--text-color-light);
    line-height: 1.4;
}

/* ===== SKILLS SECTION - iOS STYLE ===== */
.skills {
    position: relative;
    overflow: hidden;
    background-color: var(--background-color);
}

.skills::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -5%;
    width: 40%;
    height: 50%;
    background: var(--gradient-mesh);
    border-radius: 50%;
    opacity: 0.6;
    z-index: 0;
    filter: blur(60px);
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-48);
    position: relative;
    z-index: 2;
}

.skill-category h3 {
    font-size: var(--font-size-title2);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-32);
    text-align: center;
    color: var(--text-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-16);
}

.skill-item {
    background-color: var(--background-elevated);
    padding: var(--spacing-24);
    border-radius: var(--radius-medium);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all var(--transition-swift);
    position: relative;
    overflow: hidden;
}

.skill-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-swift);
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--shadow-elevated);
    border-color: rgba(0, 122, 255, 0.3);
}

.skill-item:hover::after {
    opacity: 1;
}

.skill-icon {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-16);
    transition: all var(--transition-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: var(--radius-medium);
}

.skill-item:hover .skill-icon {
    transform: scale(1.1) rotate(-5deg);
}

.skill-item h4 {
    font-size: var(--font-size-callout);
    font-weight: 600;
    letter-spacing: -0.022em;
    margin-bottom: var(--spacing-16);
    color: var(--text-color);
}

.skill-progress {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 122, 255, 0.1);
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-8);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-percentage {
    display: block;
    font-size: var(--font-size-caption1);
    color: var(--text-color-light);
    font-weight: 600;
    text-align: right;
    letter-spacing: -0.01em;
}

/* ===== TECH STACK - iOS STYLE ===== */
.tech-stack {
    background-color: var(--background-color);
    position: relative;
    overflow: hidden;
}

.tech-stack::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 60%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gradient-mesh);
    border-radius: 50%;
    opacity: 0.4;
    z-index: 0;
    filter: blur(80px);
}

.tech-categories {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-48);
    position: relative;
    z-index: 1;
}

.tech-category h3 {
    text-align: center;
    margin-bottom: var(--spacing-32);
    font-size: var(--font-size-title2);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-color);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--spacing-16);
    justify-items: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-12);
    padding: var(--spacing-20);
    background-color: var(--background-elevated);
    border-radius: var(--radius-medium);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all var(--transition-swift);
    cursor: pointer;
    width: 100%;
    aspect-ratio: 1;
}

.tech-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 24px var(--shadow-elevated);
    border-color: rgba(0, 122, 255, 0.3);
}

.tech-item:active {
    transform: translateY(-4px) scale(0.98);
}

.tech-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform var(--transition-spring);
}

.tech-item:hover img {
    transform: scale(1.1);
}

.tech-item span {
    font-size: var(--font-size-caption1);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-color);
    text-align: center;
}



/* ===== PROJECTS SECTION - iOS STYLE ===== */
.projects {
    background-color: var(--background-color);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 40%;
    height: 60%;
    background: var(--gradient-mesh);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
    filter: blur(60px);
}

/* Subtle global pastel overlay for hero and sections */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-pastel-overlay);
    pointer-events: none;
    z-index: 0;
}

.projects .container {
    position: relative;
    z-index: 2;
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-12);
    margin-bottom: var(--spacing-48);
}

.filter-btn {
    padding: var(--spacing-12) var(--spacing-24);
    border: none;
    background-color: var(--background-elevated);
    color: var(--text-color);
    border-radius: var(--radius-large);
    cursor: pointer;
    font-weight: 600;
    font-size: var(--font-size-callout);
    letter-spacing: -0.022em;
    transition: all var(--transition-swift);
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.filter-btn:hover {
    background-color: var(--background-secondary);
    transform: scale(1.02);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-24);
}

.project-item {
    background-color: var(--background-elevated);
    border-radius: var(--radius-medium);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all var(--transition-swift);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px var(--shadow-elevated);
    border-color: rgba(0, 122, 255, 0.3);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gradient-mesh);
}

.project-content {
    padding: var(--spacing-20);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: var(--font-size-title3);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-12);
    color: var(--text-color);
}

.project-content p {
    font-size: var(--font-size-subheadline);
    color: var(--text-color-light);
    line-height: 1.5;
    margin-bottom: var(--spacing-16);
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0,0,0,0.04);
    flex: 1;

/* ===== CODE SNIPPET CONTAINER (Contact section) - FROSTED GLASS ===== */
.code-snippet-container {
    background: color-mix(in oklab, var(--background-elevated), transparent 25%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    box-shadow: 0 8px 28px var(--shadow-color);
    overflow: hidden;
    backdrop-filter: var(--blur-light);
    -webkit-backdrop-filter: var(--blur-light);
}

.code-snippet-container .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-12) var(--spacing-16);
    background: var(--gradient-primary);
    color: white;
}

.code-snippet-container pre {
    margin: 0;
    padding: var(--spacing-16);
    background: color-mix(in oklab, var(--background-alt), transparent 10%);
}

.code-snippet-container code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
    text-shadow: 0 1px 1px rgba(0,0,0,0.03);
}
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-16);
}

.project-tag {
    display: inline-block;
    padding: var(--spacing-4) var(--spacing-12);
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    font-size: var(--font-size-caption1);
    border-radius: var(--radius-small);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.project-links {
    display: flex;
    gap: var(--spacing-16);
    padding-top: var(--spacing-16);
    border-top: 1px solid var(--separator-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: var(--font-size-subheadline);
    letter-spacing: -0.022em;
    transition: opacity var(--transition-swift);
}

.project-link:hover {
    opacity: 0.7;
}

.project-link i {
    margin-right: var(--spacing-8);
}

/* ===== CONTACT SECTION - iOS STYLE ===== */
.contact {
    background-color: var(--background-color);
}

.contact-content {
    display: flex;
    gap: var(--spacing-48);
}

.contact-info,
.contact-code {
    flex: 1;
}

.contact-info h3 {
    font-size: var(--font-size-title1);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-16);
    color: var(--text-color);
}

.contact-info p {
    margin-bottom: var(--spacing-32);
    color: var(--text-color-light);
    font-size: var(--font-size-body);
    line-height: 1.5;
    letter-spacing: -0.022em;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-20);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-16);
    padding: var(--spacing-20);
    background-color: var(--background-elevated);
    border-radius: var(--radius-large);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all var(--transition-swift);
}

.contact-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: rgba(0, 122, 255, 0.3);
}

.contact-item i {
    font-size: var(--font-size-title2);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.1);
    border-radius: var(--radius-medium);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: var(--font-size-callout);
    font-weight: 600;
    letter-spacing: -0.022em;
    margin-bottom: var(--spacing-4);
    color: var(--text-color);
}

.contact-item p {
    font-size: var(--font-size-subheadline);
    color: var(--text-color-light);
    line-height: 1.4;
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background-color: var(--background-color);
    color: var(--primary-color);
    font-size: var(--font-size-normal);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: var(--spacing-20);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-16) var(--spacing-16);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-medium);
    background-color: var(--background-elevated);
    color: var(--text-color);
    font-size: var(--font-size-body);
    letter-spacing: -0.022em;
    transition: all var(--transition-swift);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    background-color: var(--background-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-color-light);
    opacity: 0.7;
}

.form-group textarea {
    resize: vertical;
    min-height: 160px;
    line-height: 1.5;
}

#form-status {
    margin-top: var(--spacing-20);
    padding: var(--spacing-16);
    border-radius: var(--radius-medium);
    font-weight: 600;
    font-size: var(--font-size-subheadline);
    letter-spacing: -0.022em;
    display: none;
}

#form-status.success {
    background-color: rgba(52, 199, 89, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.3);
    display: block;
}

#form-status.error {
    background-color: rgba(255, 59, 48, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(255, 59, 48, 0.3);
    display: block;
}

/* ===== Code snippet showcase - iOS Style ===== */
.code-snippet-container {
    border-radius: var(--radius-xlarge);
    overflow: hidden;
    box-shadow: 0 8px 24px var(--shadow-elevated);
    border: 1px solid var(--border-color);
    background-color: var(--background-elevated);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-16) var(--spacing-20);
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .code-header {
    background: linear-gradient(135deg, #000000 0%, #1c1c1e 100%);
}

.code-title {
    font-size: var(--font-size-footnote);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.code-actions {
    display: flex;
    gap: var(--spacing-8);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    transition: transform var(--transition-swift);
}

.code-dot:hover {
    transform: scale(1.2);
}

.code-dot.red {
    background-color: #ff5f57;
}

.code-dot.yellow {
    background-color: #ffbd2e;
}

.code-dot.green {
    background-color: #28ca42;
}

.code-snippet-container pre {
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
    background-color: #1e1e1e;
}

[data-theme="dark"] .code-snippet-container pre {
    background-color: #000000;
}

.code-snippet-container code {
    font-family: 'SF Mono', 'Menlo', 'Consolas', 'Monaco', monospace;
    font-size: var(--font-size-caption1);
    line-height: 1.6;
    padding: var(--spacing-20);
    display: block;
    color: #d4d4d4;
} 


/* ===== FOOTER - iOS STYLE ===== */
.footer {
    background-color: var(--background-elevated);
    padding: var(--spacing-48) 0 var(--spacing-32);
    border-top: 0.5px solid var(--separator-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-24);
    margin-bottom: var(--spacing-32);
    text-align: center;
}

.footer-logo h2 {
    font-size: var(--font-size-title2);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-content p {
    color: var(--text-color-light);
    font-size: var(--font-size-subheadline);
    letter-spacing: -0.022em;
}

.footer-social {
    display: flex;
    gap: var(--spacing-12);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-24);
    border-top: 0.5px solid var(--separator-color);
}

.footer-bottom p {
    color: var(--text-color-secondary);
    font-size: var(--font-size-footnote);
    letter-spacing: -0.01em;
}

/* ===== BACK TO TOP BUTTON - iOS STYLE ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-title3);
    cursor: pointer;
    opacity: 0;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--blur-light);
    -webkit-backdrop-filter: var(--blur-light);
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
    border: none;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Hide back-to-top button (requested removal) */
#back-to-top {
    display: none !important;
}

/* ===== ANIMATIONS - iOS STYLE ===== */
.animate-text {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.15s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.delay-3 {
    animation-delay: 0.45s;
}

.delay-4 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Smooth scroll behavior for iOS */
html {
    scroll-padding-top: 80px;
}

/* iOS-style selection color */
::selection {
    background-color: rgba(0, 122, 255, 0.2);
    color: var(--text-color);
}

::-moz-selection {
    background-color: rgba(0, 122, 255, 0.2);
    color: var(--text-color);
}

/* iOS-style scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-color-light);
    border-radius: var(--radius-medium);
    border: 3px solid var(--background-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color-secondary);
}

/* ===== RESPONSIVE STYLES - iOS ADAPTIVE DESIGN ===== */

/* iPad Pro and Tablets */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-20);
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* iPad and Large Mobile */
@media screen and (max-width: 992px) {
    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
        gap: var(--spacing-48);
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-buttons, .social-icons {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
        gap: var(--spacing-40);
    }
    
    .about-details {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        flex-direction: column;
        gap: var(--spacing-40);
    }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    :root {
        --font-size-large-title: 1.75rem;
        --font-size-title1: 1.5rem;
        --font-size-title2: 1.25rem;
    }
    
    .section {
        padding: var(--spacing-48) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-40);
    }
    
    .container {
        padding: 0 var(--spacing-16);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background-color: rgba(242, 242, 247, 0.95);
        backdrop-filter: var(--blur-medium);
        -webkit-backdrop-filter: var(--blur-medium);
        width: 100%;
        text-align: center;
        transition: left var(--transition-smooth);
        box-shadow: 0 8px 32px var(--shadow-elevated);
        padding: var(--spacing-24) 0;
        border-bottom: 0.5px solid var(--separator-color);
    }
    
    [data-theme="dark"] .nav-menu {
        background-color: rgba(28, 28, 30, 0.95);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: var(--spacing-12) 0;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-12) var(--spacing-20);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto var(--spacing-32);
    }
    
    .btn {
        width: 100%;
    }
    
    .about-details {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 48px;
        height: 48px;
    }
}

/* iPhone and Small Mobile */
@media screen and (max-width: 576px) {
    .profile-container {
        width: 260px;
        height: 260px;
    }
    
    .hero-buttons {
        max-width: 100%;
    }
    
    .skills-grid,
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .detail-item {
        padding: var(--spacing-16);
    }
    
    .skill-item {
        padding: var(--spacing-20);
    }
    
    .social-icons {
        gap: var(--spacing-8);
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .navbar .container,
    .section .container {
        padding-left: max(var(--spacing-24), env(safe-area-inset-left));
        padding-right: max(var(--spacing-24), env(safe-area-inset-right));
    }
    
    .back-to-top {
        right: max(32px, env(safe-area-inset-right));
        bottom: max(32px, env(safe-area-inset-bottom));
    }
}

/* ===== iOS-SPECIFIC ENHANCEMENTS ===== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode media query support */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #0A84FF;
        --secondary-color: #5E5CE6;
        --accent-color: #FF453A;
        --success-color: #32D74B;
        --warning-color: #FF9F0A;
        --text-color: #FFFFFF;
        --text-color-light: #98989D;
        --text-color-secondary: #8E8E93;
        --background-color: #000000;
        --background-elevated: #1C1C1E;
        --background-alt: #1C1C1E;
        --background-secondary: #2C2C2E;
        --border-color: rgba(255, 255, 255, 0.08);
        --separator-color: rgba(255, 255, 255, 0.2);
        --shadow-color: rgba(0, 0, 0, 0.3);
        --shadow-elevated: rgba(0, 0, 0, 0.5);
        --gradient-primary: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
        --gradient-mesh: linear-gradient(135deg, rgba(10, 132, 255, 0.15) 0%, rgba(94, 92, 230, 0.15) 100%);
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS Safari bottom bar */
    .hero {
        min-height: -webkit-fill-available;
    }
    
    /* Prevent tap highlight */
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Glassmorphism effect for cards */
.detail-item,
.skill-item,
.project-item,
.contact-item {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* iOS-style focus visible */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--radius-small);
}

/* Smooth font rendering on Mac/iOS */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Loading state for images */
img {
    background: var(--background-secondary);
}

img[src] {
    background: transparent;
}

/* iOS-style shimmer animation for loading states */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
        to right,
        var(--background-alt) 0%,
        var(--background-secondary) 20%,
        var(--background-alt) 40%,
        var(--background-alt) 100%
    );
    background-size: 1000px 100%;
} 












