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

:root {
  --color-bg: #0a0a0a;
  --color-bg-alt: #111111;
  --color-surface: #1a1a1a;
  --color-border: #2a2a2a;
  --color-text: #e5e5e5;
  --color-text-muted: #999;
  --color-primary: #60a5fa;
  --color-primary-dark: #3b82f6;
  --color-accent: #a78bfa;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--color-accent); }

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
  letter-spacing: -0.5px;
}
.nav-logo:hover { color: var(--color-primary); }

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

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-text); }

.nav-cta {
  background: var(--color-primary-dark);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--color-primary);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(96,165,250,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  max-width: 600px;
  flex: 1;
}

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 4px solid var(--color-border);
  box-shadow: 0 0 40px rgba(96, 165, 250, 0.15);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero-image img:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 60px rgba(96, 165, 250, 0.25);
}

.hero-greeting {
  font-size: 1.125rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.hero-summary {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-primary-dark);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.hero-links {
  display: flex;
  gap: 20px;
}

.hero-links a {
  color: var(--color-text-muted);
  transition: color 0.2s, transform 0.2s;
}
.hero-links a:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}
.hero-links svg {
  width: 24px;
  height: 24px;
}

/* === Sections === */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-size: 1.0625rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.highlight-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.highlight-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.highlight-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 3px solid var(--color-primary);
  z-index: 1;
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.timeline-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.timeline-company {
  color: var(--color-primary);
  font-size: 0.9375rem;
  margin-top: 2px;
}

.timeline-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  background: var(--color-bg);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
}

.timeline-details {
  list-style: none;
}

.timeline-details li {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.timeline-details li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
}

/* === Projects === */
.project-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary-dark);
  color: #fff;
  border-color: var(--color-primary-dark);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.project-card.hidden {
  display: none;
}

.project-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.project-client {
  font-size: 0.8125rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.project-card > p:not(.project-client) {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  background: rgba(96, 165, 250, 0.1);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* === Published Apps === */
.apps-intro {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  margin-bottom: 32px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, border-color 0.2s;
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.app-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.app-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.app-developer {
  font-size: 0.8125rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.app-info > p:last-child {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.app-stores {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #1a472a;
  color: #4ade80;
  border: 1px solid #22633a;
  transition: all 0.2s;
}
.store-badge:hover {
  background: #22633a;
  color: #86efac;
  transform: translateY(-1px);
}
.store-badge svg {
  width: 18px;
  height: 18px;
}

.store-badge-apple {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}
.store-badge-apple:hover {
  background: #334155;
  color: #e2e8f0;
}

/* === Skills === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.skill-category {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* === Education === */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.edu-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.edu-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.edu-school {
  color: var(--color-primary);
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.edu-year {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.edu-list {
  list-style: none;
}

.edu-list li {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.edu-list li:last-child { border-bottom: none; }

/* === Contact === */
.contact-intro {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--color-text);
  transition: all 0.2s;
}
a.contact-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.contact-card svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.contact-card span {
  font-size: 0.9375rem;
}

/* === Footer === */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer p {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-links.open { display: flex; }

  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero-name { font-size: 2.25rem; }

  .hero-layout {
    flex-direction: column-reverse;
    gap: 32px;
    text-align: center;
  }
  .hero-image img { width: 200px; height: 200px; }
  .hero-actions { justify-content: center; }
  .hero-links { justify-content: center; }

  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .timeline-header { flex-direction: column; }

  .section { padding: 64px 0; }
}

/* === Animations === */
@media (prefers-reduced-motion: no-preference) {
  .project-card,
  .app-card,
  .skill-category,
  .edu-card,
  .highlight-card,
  .timeline-content,
  .contact-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s;
  }

  .project-card.visible,
  .app-card.visible,
  .skill-category.visible,
  .edu-card.visible,
  .highlight-card.visible,
  .timeline-content.visible,
  .contact-card.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
