/* ============================================================
   Oscar Camacho — Portafolio
   Paleta: Teal #1F4E5F · Ámbar #C98A3E · Crema #F5E6C8
   ============================================================ */

:root {
  --teal:        #1F4E5F;
  --teal-dark:   #163B47;
  --teal-xdark:  #0D2830;
  --teal-light:  #2C6B80;
  --amber:       #C98A3E;
  --amber-light: #D9A25C;
  --amber-pale:  #F0D9B5;
  --cream:       #F5E6C8;
  --cream-light: #FAF2DE;
  --cream-pale:  #FEFBF5;

  --panel:   #ffffff;
  --line:    #D9E6E2;
  --line-lt: #E8F0EE;
  --bg:      #F3F8F7;

  --text:     #10262B;
  --muted:    #4F7680;
  --muted-lt: #7398A2;

  --sh:    0 4px 20px rgba(13,40,48,0.08);
  --sh-md: 0 12px 36px rgba(13,40,48,0.12);
  --sh-lg: 0 24px 64px rgba(13,40,48,0.18);
  --r:     20px;
  --r-sm:  14px;
  --t:     .22s cubic-bezier(.4,0,.2,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --panel:   #142023;
    --line:    #24373b;
    --line-lt: #1c2b2e;
    --bg:      #0D1618;
    --text:    #E5EEEC;
    --muted:   #85A3A8;
    --muted-lt:#6B8B90;
    --cream-pale: #17211f;
    --amber-pale: #35291a;
  }
}
:root[data-theme="dark"] {
  --panel:   #142023;
  --line:    #24373b;
  --line-lt: #1c2b2e;
  --bg:      #0D1618;
  --text:    #E5EEEC;
  --muted:   #85A3A8;
  --muted-lt:#6B8B90;
  --cream-pale: #17211f;
  --amber-pale: #35291a;
}
:root[data-theme="light"] {
  --panel:   #ffffff;
  --line:    #D9E6E2;
  --line-lt: #E8F0EE;
  --bg:      #F3F8F7;
  --text:    #10262B;
  --muted:   #4F7680;
  --muted-lt:#7398A2;
  --cream-pale: #FEFBF5;
  --amber-pale: #F0D9B5;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--cream-pale);
  color: var(--teal);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: .85em;
}

/* ── Noise texture (subtle) ── */
.noise-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: .025; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Hero ── */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, var(--teal-light) 0%, var(--teal) 42%, var(--teal-xdark) 100%);
  color: var(--cream-pale);
  padding: 120px 24px 100px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -20%; right: -10%; width: 60%; height: 140%;
  background: radial-gradient(circle, rgba(201,138,62,0.25) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto; text-align: center;
}
.hero-kicker {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber-light);
  border: 1px solid rgba(217,162,92,.4);
  padding: 6px 16px; border-radius: 999px;
  margin-bottom: 24px;
  animation: fadeUp .6s ease both;
}
.hero-name {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 18px;
  animation: fadeUp .6s .05s ease both;
}
.hero-pitch {
  font-size: 1.15rem; color: rgba(245,230,200,0.85);
  max-width: 560px; margin: 0 auto 36px;
  animation: fadeUp .6s .1s ease both;
}
.hero-contact {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  animation: fadeUp .6s .15s ease both;
}
.contact-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(245,230,200,0.25);
  color: var(--cream-pale);
  padding: 10px 20px; border-radius: 999px;
  font-size: .9rem; font-weight: 500;
  text-decoration: none;
  transition: background var(--t), transform var(--t), border-color var(--t);
  backdrop-filter: blur(8px);
}
.contact-pill:hover {
  background: rgba(201,138,62,0.22);
  border-color: rgba(217,162,92,.6);
  transform: translateY(-2px);
}
.contact-icon { font-size: 1rem; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Sections ── */
.section { padding: 88px 24px; position: relative; z-index: 2; }
.section-alt { background: var(--cream-pale); }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-label {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; color: var(--teal); margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 1.02rem; }

/* ── Project cards ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--sh);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg);
  border-color: var(--amber-pale);
}
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.project-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.stack-tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .02em;
  background: var(--cream-pale); color: var(--teal);
  border: 1px solid var(--amber-pale);
  padding: 3px 10px; border-radius: 999px;
}
.project-title { font-size: 1.25rem; font-weight: 700; color: var(--teal); margin-bottom: 10px; }
.project-desc { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.project-points { list-style: none; margin-bottom: 24px; flex: 1; }
.project-points li {
  font-size: .85rem; color: var(--text); opacity: .85;
  padding-left: 18px; position: relative; margin-bottom: 8px; line-height: 1.5;
}
.project-points li::before {
  content: '→'; position: absolute; left: 0; color: var(--amber); font-weight: 700;
}
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .9rem; color: var(--teal);
  text-decoration: none; padding-top: 12px; border-top: 1px solid var(--line-lt);
  transition: gap var(--t), color var(--t);
}
.project-link:hover { gap: 10px; color: var(--amber); }

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.skill-group {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 24px;
}
.skill-group h4 { color: var(--teal); font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.skill-group p { color: var(--muted); font-size: .88rem; }

/* ── Footer ── */
.footer {
  background: var(--teal-xdark);
  color: var(--cream-pale);
  padding: 64px 24px;
  text-align: center;
}
.footer-inner { max-width: 560px; margin: 0 auto; }
.footer-inner > p:first-child { font-size: 1.1rem; font-weight: 600; margin-bottom: 24px; }
.footer-note { margin-top: 28px; font-size: .82rem; color: rgba(245,230,200,0.6); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero { padding: 90px 20px 72px; }
  .section { padding: 64px 20px; }
  .hero-contact, .footer .hero-contact { flex-direction: column; align-items: center; }
}
