/* --- Variables --- */
:root {
  --bg: #1a1a1a;
  --bg-elevated: #242424;
  --text: #ffffff;
  --text-muted: #b0b0b0;
  --accent: #ff4757;
  --accent-glow: rgba(255, 71, 87, 0.4);
  --border: #333;
  --font: "DM Sans", system-ui, sans-serif;
}

/* --- Reset & base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active {
  position: relative;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-greeting {
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.accent-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-greeting::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 2rem;
  height: 2px;
  background: var(--accent);
}

.hero-name {
  font-size: 1.5rem;
  margin: 0.5rem 0 0;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: #ff5c6b;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  font-size: 4rem;
  color: var(--text-muted);
  opacity: 0.15;
}

.shape-1 { top: 20%; right: 15%; }
.shape-2 { bottom: 25%; left: 10%; }

.hero-avatar-wrap {
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  object-fit: cover;
  display: block;
}

/* --- Skills bar --- */
.skills-bar {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #e07a7a;
  background-color: #2d1819;
  border: 1px solid #c96a6a;
  border-radius: 8px;
}

.skill-logo {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  /* Simple Icons are black; tint to match tag text */
  filter: brightness(0) invert(0.85) sepia(0.2) saturate(4) hue-rotate(320deg);
}

/* --- Services & About --- */
.services-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.services {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--accent);
}

.service-icon {
  font-size: 1.25rem;
  color: var(--accent);
}

.service-title {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Featured service cards (Native & Cross-Platform) */
.service-item-featured {
  padding: 1.25rem 1.25rem 1.25rem 0;
  border-left: none;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  gap: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-item-featured:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.service-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.15) 0%, rgba(255, 71, 87, 0.06) 100%);
  border: 1px solid rgba(255, 71, 87, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-item-featured .service-icon {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
}

.service-body {
  flex: 1;
  min-width: 0;
}

.service-item-featured .service-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem 0;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.about-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.65;
}

.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Projects --- */
.projects {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.projects .section-title {
  margin-bottom: 1.5rem;
}

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

.project-card {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* --- Experience --- */
.experience {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.experience .section-title {
  margin-bottom: 1.5rem;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-item {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.experience-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.experience-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.experience-role {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.experience-company {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}

.experience-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

.experience-bullets {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.experience-bullets li {
  margin-bottom: 0.35rem;
}

.experience-bullets li:last-child {
  margin-bottom: 0;
}

/* --- Contact --- */
.contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.contact .section-title {
  margin-bottom: 1rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}

.contact-link {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.contact-location {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem 2rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }

  .nav.open .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav.open .nav-link:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .menu-toggle span {
    transition: transform 0.2s, opacity 0.2s;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
    min-height: 240px;
  }

  .hero-greeting {
    justify-content: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-avatar {
    width: 180px;
    height: 180px;
  }

  .skills-inner {
    justify-content: center;
    gap: 1rem;
  }

  .services-about {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }

  .service-item-featured {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .about {
    text-align: center;
  }


  .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-stats {
    justify-content: center;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}
