:root {
  --bg: #0b0d12;
  --bg-alt: #10131a;
  --surface: #161a23;
  --border: #262b36;
  --text: #e8eaf0;
  --text-muted: #9aa2b1;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --radius: 12px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-decoration: none;
}

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

.hero {
  position: relative;
  padding: 96px 24px 64px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(91, 140, 255, 0.28), transparent 70%),
              radial-gradient(closest-side at 70% 30%, rgba(240, 147, 251, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-with-photo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { flex: 1 1 auto; min-width: 0; }

.hero-photo {
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 720px) {
  .hero-with-photo {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px;
  }
  .hero-photo { width: 140px; height: 140px; }
  .cta-row { justify-content: center; }
}

.stats-strip {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 56px auto 0;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: -1px;
}

.stat { text-align: center; }

.stat-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.stat-label {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.hero h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.summary {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:hover { text-decoration: none; }

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

.btn-primary:hover { background: #4877e6; }

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

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

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

.section.alt {
  max-width: none;
  background: var(--bg-alt);
}

.section.alt > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: -12px 0 32px;
}

.about-text {
  color: var(--text-muted);
  max-width: 720px;
  font-size: 1.02rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.skill-card h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--accent);
}

.skill-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-card li {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline-item {
  display: flex;
  gap: 20px;
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-marker {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}

.timeline-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
}

.timeline-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.timeline-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 12px;
}

.timeline-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.period {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.org {
  color: var(--text-muted);
  margin: 4px 0 12px;
  font-size: 0.92rem;
}

.timeline-content ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.timeline-content li { margin-bottom: 6px; }

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 600;
}

.tagline {
  color: var(--accent);
  font-size: 0.88rem;
  margin: 6px 0 12px;
}

.description {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.highlights {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.highlights li { margin-bottom: 4px; }

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.chip {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}

.confidential-note {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Featured projects */
.featured-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-bottom: 72px;
}

.featured-project {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

.featured-project:nth-child(even) .featured-shot { order: 2; }
.featured-project:nth-child(even) .featured-copy { order: 1; }

.browser-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.browser-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.gallery-thumb {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  object-position: top;
}

.gallery-thumb figcaption {
  padding: 6px 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.featured-header h4 {
  margin: 0;
  font-size: 1.3rem;
}

.featured-copy .tagline { margin-top: 8px; }
.featured-copy .description { font-size: 0.95rem; }
.featured-copy .highlights { font-size: 0.9rem; }

@media (max-width: 860px) {
  .featured-project {
    grid-template-columns: 1fr;
  }
  .featured-project:nth-child(even) .featured-shot,
  .featured-project:nth-child(even) .featured-copy {
    order: initial;
  }
}

/* Confidential (MELI) block */
.confidential-block {
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.confidential-heading {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.confidential-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 680px;
  margin: 0 0 28px;
}

/* Future work */
.future-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.future-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.future-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.future-card h4 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.future-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.contact {
  text-align: center;
  padding-bottom: 96px;
}

.contact-message {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

.contact .cta-row {
  justify-content: center;
}

.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.82rem; }
}
