/* =========================================================
   TOKENS
========================================================= */
:root{
  --bg: #0A0F1C;
  --surface: #111827;
  --surface-2: #161F32;
  --border: #24304A;
  --border-soft: #1A2338;

  --text: #E7ECF5;
  --text-dim: #8B96AC;
  --text-faint: #5C6883;

  --accent: #3DDC84;       /* status-online green (also nods to Android) */
  --accent-dim: #2AA866;
  --accent-blue: #5B8DEF;  /* links / sync */
  --accent-amber: #F5A623; /* sparingly: hover / highlight */
  --accent-red: #FB6A6A;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --max-w: 980px;

  --ease: cubic-bezier(.16,.8,.24,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint grid texture on the page background */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 85%);
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
h1,h2,h3,p{ margin: 0; }

::selection{ background: var(--accent); color: #06130C; }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   LAYOUT HELPERS
========================================================= */
.eyebrow{
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.section{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 24px 0;
  position: relative;
  z-index: 1;
}
.section__title{
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 40px;
  color: var(--text);
}
.grid{ display: grid; gap: 16px; }
.grid--skills{ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--certs{ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* reveal-on-scroll */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: none; }

/* =========================================================
   NAV
========================================================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(10,15,28,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav__brand{
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.nav__brand .dim{ color: var(--text-faint); }
.nav__links{ display: flex; gap: 24px; }
.nav__links a{
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color .2s;
}
.nav__links a:hover{ color: var(--accent); }
@media (max-width: 640px){
  .nav__links{ gap: 14px; }
}

/* =========================================================
   HERO
========================================================= */
.hero{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 24px 40px;
  position: relative;
  z-index: 1;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}

.hero__terminal{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.terminal__bar{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot{ width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--red{ background: var(--accent-red); }
.dot--yellow{ background: var(--accent-amber); }
.dot--green{ background: var(--accent); }
.terminal__title{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-left: 8px;
}
.terminal__body{
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.85;
  padding: 20px 18px;
  min-height: 168px;
  color: var(--text-dim);
  white-space: pre-wrap;
}
.terminal__body .ok{ color: var(--accent); }
.terminal__body .prompt{ color: var(--accent-blue); }
.terminal__body .cursor{
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}

.hero__reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.hero__reveal.is-visible{ opacity: 1; transform: none; }

.hero__name{
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -.01em;
  margin: 6px 0 10px;
}
.hero__tagline{
  color: var(--text-dim);
  max-width: 560px;
  font-size: 17px;
}
.hero__cta{ display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* =========================================================
   BUTTONS
========================================================= */
.btn{
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn--primary{
  background: var(--accent);
  color: #06130C;
}
.btn--primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(61,220,132,.55);
}
.btn--ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover{
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn--sm{ padding: 9px 14px; font-size: 12.5px; }
.btn[aria-disabled="true"]{
  opacity: .45;
  pointer-events: none;
}

/* =========================================================
   SKILLS ("services")
========================================================= */
.skill-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .2s, transform .2s var(--ease);
}
.skill-card:hover{
  border-color: var(--border-soft);
  transform: translateY(-3px);
}
.skill-card__head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.status-dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(61,220,132,.6);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
.skill-card__name{
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}
.skill-card__items{
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

/* =========================================================
   CERTIFICATES
========================================================= */
.cert-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: transform .2s var(--ease), border-color .2s;
}
.cert-card:hover{ transform: translateY(-3px); border-color: var(--accent-blue); }
.cert-card__badge{
  width: 176px; height: 176px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
  transition: transform .2s var(--ease), border-color .2s;
}
a:hover > .cert-card__badge{
  transform: scale(1.05);
  border-color: var(--accent);
}
.cert-card__badge img{ width: 100%; height: 100%; object-fit: contain; }
.cert-card__name{ font-weight: 600; font-size: 15px; }
.cert-card__issuer{ color: var(--text-dim); font-size: 13.5px; }
.cert-card__link{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-blue);
  margin-top: auto;
}
.cert-card__link:hover{ color: var(--accent); }

/* =========================================================
   APPS
========================================================= */
.apps__list{ display: flex; flex-direction: column; gap: 28px; }
.app-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.app-card__top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.app-card__name{
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
}
.app-card__package{
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 4px;
}
.app-card__tagline{
  color: var(--accent);
  font-size: 14px;
  margin-top: 6px;
}
.app-card__desc{
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 62ch;
  margin-bottom: 20px;
}
.app-card__shots{
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.app-card__shots img{
  height: 320px;
  width: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  flex-shrink: 0;
  transition: transform .2s var(--ease);
}
.app-card__shots img:hover{ transform: translateY(-4px); }
.app-card__shots::-webkit-scrollbar{ height: 6px; }
.app-card__shots::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 4px; }

/* =========================================================
   RESUME
========================================================= */
.resume__card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 120px;
}
.resume__icon{ color: var(--accent); flex-shrink: 0; }
.resume__meta{ flex: 1; min-width: 200px; }
.resume__filename{ font-family: var(--mono); font-size: 14.5px; font-weight: 600; }
.resume__hint{ color: var(--text-faint); font-size: 13px; margin-top: 4px; }
.resume__actions{ display: flex; gap: 10px; }

/* =========================================================
   FOOTER
========================================================= */
.footer{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 80px;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
}
.footer__links{
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0 40px;
}
.footer__links a{
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.footer__links a:hover{ color: var(--accent); border-color: var(--accent); }
.footer__note{ color: var(--text-faint); font-size: 12.5px; font-family: var(--mono); }

/* =========================================================
   LIGHTBOX
========================================================= */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(6,9,18,.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 40px;
  animation: fadeIn .2s var(--ease);
}
.lightbox[hidden]{ display: none; }
.lightbox img{
  max-height: 88vh; max-width: 90vw;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.lightbox__close{
  position: absolute; top: 22px; right: 26px;
  background: none; border: none;
  color: var(--text); font-size: 32px;
  cursor: pointer; line-height: 1;
}
.lightbox__close:hover{ color: var(--accent); }

/* =========================================================
   ANIMATIONS
========================================================= */
@keyframes blink{ 50%{ opacity: 0; } }
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(61,220,132,.55); }
  70%{ box-shadow: 0 0 0 8px rgba(61,220,132,0); }
  100%{ box-shadow: 0 0 0 0 rgba(61,220,132,0); }
}
@keyframes fadeIn{ from{ opacity: 0; } to{ opacity: 1; } }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px){
  .section{ padding-top: 80px; }
  .resume__card{ margin-bottom: 80px; }
}
