:root {
  --bg: #1c1c1e;
  --surface: #242427;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --line: #34343a;
  --max-width: 860px;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* Upgraded to the native premium system font stack */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease; /* Added smooth fade */
}

a:hover {
  opacity: 0.7;
}

.site {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0 20px;
}

.logo {
  width: 180px;
  height: auto;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.section h1 {
  text-align: center;
  margin-bottom: 16px;
}

.tagline {
  margin: 14px auto 0;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  text-align: center;
}

.section {
  padding: 24px 0 56px;
}

.intro {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0; /* This forces exactly 40px of space above AND below the text */
}

.projects {
  padding-top: 40px; /* This ensures the space below the new line matches the rest of the site */
}

/* Updated typography spacing for long-form text (like Privacy Policy) */
.section p {
  margin: 0 0 16px;
  font-size: 1.05rem;
  color: #d4d4d8;
  text-align: left; /* Ensures legal text is readable */
}

.section ul {
  margin: 0 0 24px;
  padding-left: 20px;
  color: #d4d4d8;
}

.section li {
  margin-bottom: 8px;
}

h2 {
  margin: 32px 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card {
  display: flex;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease; /* Added tactile interaction */
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #52525b;
}

.project-image {
  width: 260px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.project-text {
  flex: 1;
}

.project-text h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.project-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 28px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer a {
  color: var(--muted);
}

.footer-divider {
  color: #666;
}

/* Consolidated Media Queries */
@media (max-width: 640px) {
  .hero {
    min-height: 44vh;
    padding: 56px 0 36px;
  }

  .logo {
    width: 88px;
  }

  .project-card {
    flex-direction: column;
    text-align: center;
  }

  .project-image {
    width: 100%;
    height: auto;
  }

  .project-text {
    padding: 18px 0 0 0;
  }

  .footer {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* --- App Store Badge Styling --- */

.app-store-badge {
  display: inline-block;
  margin-top: 16px; 
  transition: transform 0.2s ease, opacity 0.2s ease;
  
  cursor: pointer; 
  user-select: none; 
  -webkit-user-drag: none; 
}

.app-store-badge img {
  height: 40px; /* This is the industry-standard size for mobile/web badges */
  width: auto;
}

.app-store-badge:hover {
  transform: scale(1.04); /* Gives the button a satisfying 'pop' when hovered */
  opacity: 1; /* Overrides your default a:hover opacity so the badge stays punchy */
}
