/* ============================================
   iOS Developer Portfolio - Styles
   Clean, minimal, Apple-inspired design
   ============================================ */

:root {
    /* Colors - Dark theme with subtle warmth */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-elevated: #1c1c1e;
    
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #6e6e73;
    
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-subtle: rgba(10, 132, 255, 0.12);
    
    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);
    
    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 100px;
    
    /* Animation */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Navigation
   ============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 24px;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-mobile-toggle span {
    width: 20px;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) forwards;
}

.hero h1 {
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--accent);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.hero-cta:hover {
    background: var(--accent-subtle);
}

.hero-cta svg {
    animation: bounce 2s ease-in-out infinite;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(10, 132, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* ============================================
   Work Section
   ============================================ */

.work-section {
    padding: var(--space-3xl) 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   Project Cards
   ============================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), border-color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
    background: var(--bg-card-hover);
}

.project-card-visual {
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

.project-image {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform 0.3s var(--ease-out);
}

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

/* Project Card Content */
.project-card-content {
    padding: 24px;
    border-top: 1px solid var(--border-subtle);
}

.project-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.platform-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: var(--text-secondary);
}

.project-card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.project-card-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.project-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    transition: gap 0.2s ease;
}

.project-expand-btn:hover {
    gap: 10px;
}

.project-expand-btn svg {
    transition: transform 0.2s ease;
}

/* ============================================
   Project Detail Panel
   ============================================ */

.project-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-detail-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 560px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
}

.project-detail-overlay.active .project-detail-panel {
    transform: translateX(0);
}

.panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.panel-content {
    display: none;
    padding: 60px 40px 40px;
}

.panel-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
    border-radius: 16px;
}

.panel-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.panel-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
}

.panel-section {
    margin-bottom: 32px;
}

.panel-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.panel-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tech-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tech-list li strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tech-list li span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.framework-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.framework-tags span {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 6px 14px;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-sm);
}

.panel-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-store-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.apple-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.app-store-btn.coming-soon {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: default;
}

.app-store-btn.coming-soon:hover {
    opacity: 1;
    transform: none;
}

/* ============================================
   About Section
   ============================================ */

.about-section {
    padding: var(--space-3xl) 24px;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.about-lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.skill-category h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.skill-category li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: var(--space-3xl) 24px var(--space-xl);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-cta {
    margin-bottom: var(--space-2xl);
}

.footer-cta h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.footer-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 14px 20px;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .work-section {
        padding: var(--space-2xl) 20px;
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
    
    .project-card-visual {
        padding: 32px 24px;
        min-height: 240px;
    }
    
    .project-card-content {
        padding: 20px;
    }
    
    .project-detail-panel {
        max-width: 100%;
    }
    
    .panel-content {
        padding: 60px 24px 24px;
    }
    
    .about-section {
        padding: var(--space-2xl) 20px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer {
        padding: var(--space-2xl) 20px var(--space-lg);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .device-frame.watch {
        width: 100px;
        height: 116px;
        border-radius: 26px;
    }
    
    .watch-screen {
        border-radius: 20px;
    }
    
    .device-frame.vision {
        width: 160px;
        height: 64px;
    }
    
    .device-frame.phone {
        width: 80px;
        height: 160px;
    }
}

/* ============================================
   Utilities
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
