/* =========================================================
   John Gregory M. Bola — Portfolio / CV
   Design system: dark, minimalist, animated aurora background
   ========================================================= */

:root {
  --bg: #0b1220;
  --bg-alt: #0e1626;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text: #e6edf3;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --accent-3: #f0b429;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --max-w: 1120px;
  --header-h: 72px;
}

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

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

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 1.4rem; }
h3 { font-size: 1.15rem; margin-bottom: .35em; }
p { margin: 0 0 1em; color: var(--text-dim); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

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

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .6em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #001;
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- animated background ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.blob {
  position: absolute;
  width: 48vw;
  height: 48vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .32;
  will-change: transform;
}
.blob-a { background: var(--accent); top: -10%; left: -12%; animation: float-a 22s ease-in-out infinite; }
.blob-b { background: var(--accent-2); bottom: -15%; right: -10%; animation: float-b 26s ease-in-out infinite; }
.blob-c { background: var(--accent-3); top: 35%; left: 45%; opacity: .18; animation: float-c 30s ease-in-out infinite; }

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 8vh) scale(1.15); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -6vh) scale(1.1); }
}
@keyframes float-c {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  50% { transform: translate(-45%, -55%) rotate(20deg); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 75%);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(11, 18, 32, .55);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .3s ease;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--text-dim);
  font-size: .93rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--grad);
  transition: width .25s ease;
}
.main-nav a:hover::after { width: 100%; }
.nav-cta {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 8px 16px !important;
  border-radius: 999px;
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #04121a;
  box-shadow: 0 8px 24px -8px rgba(34, 211, 238, .5);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px rgba(99, 102, 241, .55); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--surface-border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}
.hero-role {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: .6em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero-summary { max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 1.6rem 0; }
.hero-meta { display: flex; flex-direction: column; gap: 8px; margin-top: 1.2rem; color: var(--text-dim); font-size: .95rem; }
.hero-meta a { color: var(--text-dim); }
.hero-meta a:hover { color: var(--accent); }

.hero-photo { display: flex; justify-content: center; }
.photo-frame {
  position: relative;
  width: min(340px, 80vw);
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.photo-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: var(--grad);
  opacity: .5;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame img.is-placeholder { object-fit: contain; background: #0b1220; }
.photo-frame--square { aspect-ratio: 1 / 1; }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--surface-border);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; }
}

/* ---------- sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.02) 15%, rgba(255,255,255,.02) 85%, transparent); }

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* about */
.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-photo .photo-frame { width: min(320px, 70vw); margin: 0 auto; }
.stat-row { display: flex; gap: 40px; margin-top: 1.6rem; flex-wrap: wrap; }
.stat-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: .85rem; color: var(--text-faint); }

/* timeline */
.timeline { position: relative; margin-top: 2.2rem; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
  opacity: .4;
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(34,211,238,.15);
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 22px 26px;
  transition: transform .25s ease, border-color .25s ease;
}
.timeline-card:hover { transform: translateY(-3px); border-color: rgba(34,211,238,.35); }
.timeline-date {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.timeline-org { color: var(--text); font-weight: 500; margin-bottom: .5em; }
.timeline-card p:last-child { margin-bottom: 0; }

/* cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 1.6rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(99,102,241,.4); }
.card-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 10px;
}
.card-sub { color: var(--text-faint); font-size: .9rem; margin-bottom: 0; }

/* skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 1.6rem;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 22px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--surface-border);
  color: var(--text-dim);
}

/* certifications */
.cert-feature {
  background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(99,102,241,.08));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 1.6rem;
  margin-bottom: 20px;
}
.cert-feature-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.cert-feature-head h3 { margin: 0; }

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
}
.contact-lede { max-width: 42ch; }
.contact-list { display: flex; flex-direction: column; gap: 14px; margin-top: 1.6rem; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list span { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.contact-list a { color: var(--text); font-weight: 500; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--text-dim); }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,.15);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 12px 0 0; font-size: .88rem; min-height: 1.2em; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

/* footer */
.site-footer {
  padding: 32px 0 48px;
  text-align: center;
  color: var(--text-faint);
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-summary { margin-left: auto; margin-right: auto; }
  .hero-meta { align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-photo { order: -1; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; }
  .stat-row { justify-content: center; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(11, 18, 32, .97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .section { padding: 76px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  h1 { font-size: 2.1rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .scroll-cue span { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  #particles { display: none; }
}

/* ---------- print (Download as PDF) ---------- */
@media print {
  :root {
    --text: #111418;
    --text-dim: #3a3f47;
    --text-faint: #5b6270;
    --accent: #0e7490;
    --accent-2: #4338ca;
    --accent-3: #92400e;
    --surface-border: #ccc;
  }
  .bg-fx, .site-header, .scroll-cue, #particles, .hero-actions #printBtn,
  .contact-form, .nav-toggle { display: none !important; }
  body { background: #fff; color: #111; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .section { padding: 18px 0; }
  a { color: #111; text-decoration: underline; }
  .card, .timeline-card, .skill-group, .cert-feature {
    background: #fff; border: 1px solid #ccc; box-shadow: none;
  }
  .grad-text, .stat-num { -webkit-text-fill-color: #111; color: #111; }
  .hero { min-height: auto; padding-top: 20px; }
  .photo-frame { box-shadow: none; border: 1px solid #ccc; }
}
