/* ─── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07091a;
  --surface:   #0d1230;
  --surface2:  #141a3d;
  --border:    #1e2a5a;
  --accent:    #4f9cf9;
  --accent2:   #7c3aed;
  --gold:      #f0c060;
  --text:      #e2e8f0;
  --muted:     #7282a0;
  --nav-h:     64px;
  --radius:    12px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

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

/* ─── Nav ──────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(7,9,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent);
}
.nav-logo span { color: var(--gold); }

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

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ─── Page wrapper ─────────────────────────────── */
.page { padding-top: var(--nav-h); }

/* ─── Section helpers ──────────────────────────── */
section { padding: 5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
}

/* ─── Hero (index only) ────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 40%, rgba(79,156,249,.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 20% 80%, rgba(124,58,237,.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 700px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(79,156,249,.12);
  border: 1px solid rgba(79,156,249,.3);
  border-radius: 99px;
  padding: .3rem .9rem;
  font-size: .8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero h1 .name { color: var(--accent); }
.hero h1 .role {
  display: block;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

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

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #6fb0ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,156,249,.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Quick-links grid (index) ─────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.portal-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.portal-card:hover { border-color: var(--card-accent, var(--accent)); transform: translateY(-4px); }
.portal-card:hover::before { transform: scaleX(1); }

.portal-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.portal-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.portal-card p { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }
.portal-card a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--card-accent, var(--accent));
  display: inline-flex; align-items: center; gap: .3rem;
}
.portal-card a:hover { gap: .6rem; }

/* ─── Stats row ────────────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 4rem 0;
}
.stat { flex: 1; min-width: 120px; }
.stat .num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
}
.stat .label { font-size: .85rem; color: var(--muted); }

/* ─── Skills (expertise page) ─────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.skill-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.skill-card h3 .icon { font-size: 1.2rem; }

.tech-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  background: rgba(79,156,249,.12);
  border: 1px solid rgba(79,156,249,.2);
  color: var(--accent);
  border-radius: 6px;
  padding: .25rem .65rem;
  font-size: .78rem;
  font-weight: 600;
}
.tag.purple {
  background: rgba(124,58,237,.12);
  border-color: rgba(124,58,237,.25);
  color: #a78bfa;
}
.tag.gold {
  background: rgba(240,192,96,.1);
  border-color: rgba(240,192,96,.25);
  color: var(--gold);
}
.tag.green {
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.2);
  color: #4ade80;
}

/* ─── Timeline ─────────────────────────────────── */
.timeline { margin-top: 3rem; position: relative; }
.timeline::before {
  content: '';
  position: absolute; left: 1.25rem; top: 0; bottom: 0; width: 2px;
  background: var(--border);
}
.tl-item {
  padding-left: 4rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.tl-dot {
  position: absolute; left: .5rem; top: .3rem;
  width: 1.5rem; height: 1.5rem;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-date {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.tl-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem; }
.tl-company { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
.tl-body { font-size: .9rem; color: var(--muted); }

/* ─── Project cards (web/mobile pages) ────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.project-thumb {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}
.project-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--thumb-gradient, linear-gradient(135deg, rgba(79,156,249,.15), rgba(124,58,237,.15)));
}

.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.project-body p { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; flex: 1; }

.project-meta {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1.25rem;
}

.project-links { display: flex; gap: .75rem; }
.project-links a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(79,156,249,.3);
  border-radius: 6px;
  padding: .35rem .75rem;
  transition: all var(--transition);
}
.project-links a:hover { background: rgba(79,156,249,.12); }
.project-links a.disabled { opacity: .35; pointer-events: none; }

/* ─── Coming-soon banner ───────────────────────── */
.coming-soon {
  text-align: center;
  padding: 5rem 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 3rem;
}
.coming-soon .icon { font-size: 3rem; margin-bottom: 1rem; }
.coming-soon h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.coming-soon p { color: var(--muted); }

/* ─── Footer ───────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}
footer a { color: var(--accent); }
footer a:hover { text-decoration: underline; }

/* ─── Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; gap: 1rem; }
  .nav-links.open {
    display: flex;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
  }
  .hamburger { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .stats-row { gap: 1.5rem; }
  .timeline::before { display: none; }
  .tl-item { padding-left: 0; }
  .tl-dot { display: none; }
}

/* ─── Anti-spam: honeypot ──────────────────────── */
/* Off-screen rather than display:none — some bots skip display:none
   fields, but still scrape anything physically present in the DOM. */
.honeypot-field, .honeypot-link {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ─── Contact modal (CAPTCHA gate) ─────────────── */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 4, 12, .7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.contact-modal-overlay[hidden] {
  display: none;
}

.contact-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  position: relative;
}

.contact-modal h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.contact-modal p.hint {
  font-size: .85rem;
  color: var(--muted);
}

.contact-modal-close {
  position: absolute;
  top: .65rem;
  right: .85rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.contact-modal-close:hover { color: var(--text); }

.captcha-question {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  margin: 1.25rem 0 .75rem;
  color: var(--accent);
}

.captcha-input {
  width: 100%;
  padding: .65rem .85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
}
.captcha-input:focus {
  outline: none;
  border-color: var(--accent);
}

.captcha-error {
  color: #f87171;
  font-size: .82rem;
  margin-top: .6rem;
}
