/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Dark mode (default) ── */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --border-color: #2a2a2a;
    --card-bg: #1a1a1a;
    --card-hover: #202020;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --header-bg: rgba(10, 10, 10, 0.8);
    --header-bg-scrolled: rgba(10, 10, 10, 0.95);
    --header-shadow: rgba(0, 0, 0, 0.3);
}

/* ── Light mode ── */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #ececec;
    --text-primary: #111111;
    --text-secondary: #555555;
    --border-color: #e4e4e7;
    --card-bg: #ffffff;
    --card-hover: #fafafa;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-bg-scrolled: rgba(255, 255, 255, 0.98);
    --header-shadow: rgba(0, 0, 0, 0.08);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

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

/* ── Header ── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.header.scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: 0 2px 20px var(--header-shadow);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo-icon { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }

.nav-logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

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

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: border-color 0.3s, color 0.3s;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Sun visible in dark mode, moon in light mode */
.icon-sun { display: block; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ── Hero ── */
.hero {
    padding: 180px 0 120px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.hero-label {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    /* Dark: white → light gray */
    background: linear-gradient(135deg, #ffffff, #e5e5e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.7s ease-out;
}

/* Light mode: use dark → accent gradient instead */
[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #111111, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    animation: fadeInUp 0.9s ease-out;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

/* ── Apps ── */
.apps { padding: 100px 0; background: var(--bg-secondary); }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.app-card:hover {
    background: var(--card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.18);
}

.app-card-header { display: flex; align-items: center; gap: 1.25rem; }

.app-icon {
    width: 72px; height: 72px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.app-icon-placeholder {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.app-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }

.app-platform { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

.app-desc { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; }

.app-screenshots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.app-screenshots img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    object-fit: cover;
    aspect-ratio: 9/16;
    border: 1px solid var(--border-color);
}

.app-link { font-size: 0.95rem; font-weight: 600; color: var(--accent-primary); }
.app-card:hover .app-link { color: var(--accent-secondary); }

/* ── About ── */
.about { padding: 100px 0; background: var(--bg-primary); }

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

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #e5e5e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .about-content h2 {
    background: linear-gradient(135deg, #111111, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p { font-size: 1.125rem; color: var(--text-secondary); line-height: 1.9; }

/* ── Contact ── */
.contact { padding: 100px 0; background: var(--bg-secondary); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.contact-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.15);
}

.contact-icon { font-size: 2.5rem; }
.contact-card h3 { font-size: 1.375rem; font-weight: 700; }
.contact-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; flex: 1; }

.contact-email {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s;
    word-break: break-all;
}

.contact-email:hover { color: var(--accent-secondary); }

.btn-contact {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: 10px;
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-contact:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* ── Footer ── */
.footer {
    background: var(--bg-primary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; margin-bottom: 0.25rem; }

.footer-brand h3 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; }

.footer-links { display: flex; gap: 4rem; flex-wrap: wrap; }

.footer-column h4 { margin-bottom: 1rem; color: var(--text-primary); font-size: 0.95rem; font-weight: 600; }
.footer-column ul { list-style: none; }

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-column a:hover { color: var(--accent-primary); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 968px) {
    .hero-title { font-size: 2.75rem; }
    .apps-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; max-width: 560px; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
    .hero { padding: 140px 0 80px; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .nav-menu { gap: 1rem; }
    .nav-menu a { font-size: 0.85rem; }
    .app-card { padding: 1.75rem; }
}
