/* ═══ Jessie Mark Pongaron — Portfolio ═══ */

/* ── Tokens ─────────────────────────────── */
:root {
  --blue:        #1877C8;
  --blue-light:  #5cb3ff;
  --blue-hover:  #1565b0;
  --navy:        #091e42;
  --navy-2:      #0D2B5E;
  --navy-3:      #163568;

  --bg:          #f4f7fb;
  --surface:     #ffffff;
  --nav-bg:      rgba(9, 30, 66, .92);
  --text:        #091e42;
  --text-s:      #1e3a5f;
  --text-muted:  #6b7a99;
  --border:      #e2e8f0;
  --shadow:      0 4px 24px rgba(13,43,94,.10);
  --shadow-h:    0 14px 44px rgba(13,43,94,.16);
  --section-alt: #eaf0f8;
  --hero-bg:     linear-gradient(135deg, #091e42 0%, #0d2b5e 55%, #163568 100%);
  --input-bg:    #ffffff;
  --footer-bg:   #091e42;
  --chip-bg:     #eef4fc;
  --chip-text:   #1565b0;

  --radius:      14px;
  --tr:          .25s ease;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
[data-theme="dark"] {
  --bg:          #091e42;
  --surface:     #11294f;
  --nav-bg:      rgba(6, 20, 45, .94);
  --text:        #e8eef8;
  --text-s:      #c5d5ed;
  --text-muted:  #8fafd4;
  --border:      rgba(255,255,255,.10);
  --shadow:      0 4px 24px rgba(4,12,28,.45);
  --shadow-h:    0 14px 44px rgba(4,12,28,.6);
  --section-alt: #0d2b5e;
  --hero-bg:     linear-gradient(135deg, #06142d 0%, #0d2b5e 55%, #1a3a6e 100%);
  --input-bg:    #0d2b5e;
  --footer-bg:   #06142d;
  --chip-bg:     rgba(92,179,255,.12);
  --chip-text:   #5cb3ff;
}

/* ── Reset / base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  transition: background var(--tr), color var(--tr);
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
section { scroll-margin-top: 76px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

/* ── Buttons ────────────────────────────── */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 10px;
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  border: none; transition: background var(--tr), transform .15s, box-shadow var(--tr);
  font-family: var(--font);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(24,119,200,.35); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 15px 36px; font-size: 1rem; }

/* ── Nav ────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-brand { color: #fff; font-weight: 800; font-size: 1.02rem; text-decoration: none; letter-spacing: -.3px; }
.nav-brand span { color: var(--blue-light); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: rgba(255,255,255,.72); text-decoration: none; font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  color: #fff; border-radius: 8px; width: 38px; height: 38px; cursor: pointer;
  font-size: .95rem; transition: background .2s, transform .15s;
}
.theme-toggle:hover { background: rgba(255,255,255,.18); transform: scale(1.06); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 6px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

/* ── Hero ───────────────────────────────── */
.hero {
  background: var(--hero-bg); color: #fff;
  padding: 150px 24px 90px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 75% 20%, rgba(92,179,255,.14), transparent 65%);
  pointer-events: none;
}
.hero-inner { max-width: 1120px; margin: 0 auto; position: relative; }
.hero-top { display: flex; align-items: center; gap: 56px; }
.hero-text { flex: 1; min-width: 0; }
.hero-photo { flex-shrink: 0; }
.hero-photo img {
  width: clamp(200px, 24vw, 300px); height: clamp(200px, 24vw, 300px);
  border-radius: 50%; object-fit: cover;
  border: 4px solid rgba(92,179,255,.5);
  box-shadow: 0 0 0 10px rgba(92,179,255,.08), 0 24px 60px rgba(0,0,0,.4);
}
.hero-eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .04em;
  background: rgba(92,179,255,.14); border: 1px solid rgba(92,179,255,.3);
  color: var(--blue-light); padding: 6px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; line-height: 1.12; letter-spacing: -1.5px; }
.hero h1 .grad {
  background: linear-gradient(90deg, #5cb3ff, #8fd0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 620px; margin-top: 22px; font-size: 1.08rem; color: rgba(232,238,248,.85); }
.hero-sub strong { color: #fff; }
.hero-ctas { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-contact { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; font-size: .9rem; color: rgba(232,238,248,.7); }
.hero-contact a { color: rgba(232,238,248,.85); text-decoration: none; }
.hero-contact a:hover { color: #fff; }
/* ── Sections ───────────────────────────── */
.section { padding: 90px 0; }
.section-alt { background: var(--section-alt); transition: background var(--tr); }
.sect-eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
}
.section h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.8px; line-height: 1.2; }
.sect-sub { color: var(--text-muted); margin-top: 12px; max-width: 640px; }

/* ── About ──────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; margin-top: 36px; }
.about-text p { margin-bottom: 16px; color: var(--text-s); }
.about-points { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.about-points li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; font-size: .93rem; color: var(--text-s); box-shadow: var(--shadow);
}
.about-points strong { color: var(--text); }

/* ── Services ───────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px; margin-top: 40px;
}
.svc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow var(--tr);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.svc-ico { font-size: 1.7rem; margin-bottom: 12px; }
.svc h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.svc p { font-size: .88rem; color: var(--text-muted); }

/* ── Projects ───────────────────────────── */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px; margin-top: 40px;
}
.proj {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow var(--tr);
}
.proj:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.proj-thumb {
  position: relative; cursor: zoom-in; aspect-ratio: 16/9; overflow: hidden;
  background: #0d1b33;
}
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .3s; }
.proj-thumb:hover img { transform: scale(1.04); }
.proj-thumb::after {
  content: '🔍 Click to zoom'; position: absolute; right: 10px; bottom: 10px;
  background: rgba(9,30,66,.75); color: #fff; font-size: .72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 6px; opacity: 0; transition: opacity .2s;
}
.proj-thumb:hover::after { opacity: 1; }
.proj-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.proj-num { font-size: .72rem; font-weight: 700; color: var(--blue); letter-spacing: .08em; }
.proj h3 { font-size: 1.05rem; font-weight: 700; margin: 6px 0 8px; line-height: 1.35; }
.proj p { font-size: .87rem; color: var(--text-muted); flex: 1; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.proj-tag {
  font-size: .72rem; font-weight: 600; background: var(--chip-bg); color: var(--chip-text);
  padding: 3px 10px; border-radius: 999px;
}
.proj-actions { display: flex; gap: 10px; }
.proj-actions .btn { flex: 1; text-align: center; padding: 10px 12px; font-size: .85rem; }
.btn-outline {
  background: transparent; color: var(--blue); border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

/* ── FAQ ────────────────────────────────── */
.faq-list { margin-top: 36px; display: flex; flex-direction: column; gap: 12px; }
.faq {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.faq summary {
  padding: 18px 22px; font-weight: 600; font-size: .96rem; cursor: pointer;
  list-style: none; position: relative; padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--blue); transition: transform .2s;
}
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { padding: 0 22px 18px; font-size: .9rem; color: var(--text-muted); }

/* ── Contact form ───────────────────────── */
#contact-form { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: .85rem; font-weight: 600; color: var(--text-s); }
.form-field input, .form-field select, .form-field textarea {
  background: var(--input-bg); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: .95rem; font-family: var(--font); color: var(--text);
  transition: border-color .2s; width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue);
}
.form-field input.invalid, .form-field textarea.invalid, .form-field select.invalid { border-color: #e5484d; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { font-size: .9rem; min-height: 1.4em; }
.form-status.ok { color: #2e9e5b; font-weight: 600; }
.form-status.err { color: #e5484d; font-weight: 600; }
#cf-submit { align-self: flex-start; }
#cf-submit:disabled { opacity: .6; cursor: wait; transform: none; }

/* ── Footer ─────────────────────────────── */
.footer { background: var(--footer-bg); color: rgba(232,238,248,.75); padding: 48px 0 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px; padding-bottom: 34px;
}
.footer-name { font-weight: 700; color: #fff; }
.footer-tag { font-size: .85rem; margin-top: 2px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: rgba(232,238,248,.75); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.08); text-align: center;
  padding: 18px 24px; font-size: .8rem; color: rgba(232,238,248,.5);
}

/* ── Lightbox ───────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(4,10,24,.92);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 40px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 95vw; max-height: 82vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 20px 80px rgba(0,0,0,.6); cursor: default;
}
.lightbox-caption { color: rgba(255,255,255,.85); margin-top: 16px; font-size: .95rem; font-weight: 600; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2); color: #fff; width: 42px; height: 42px;
  border-radius: 10px; font-size: 1.1rem; cursor: pointer; transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ── Chat widget ────────────────────────── */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 1.5rem;
  box-shadow: 0 8px 28px rgba(24,119,200,.45);
  transition: transform .2s, background .2s;
}
.chat-fab:hover { transform: scale(1.08); background: var(--blue-hover); }
.chat-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 150;
  width: min(380px, calc(100vw - 44px)); height: min(540px, calc(100vh - 130px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-h); display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-header {
  background: var(--hero-bg); color: #fff; padding: 16px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-title { font-weight: 700; font-size: .98rem; }
.chat-sub { font-size: .78rem; color: rgba(232,238,248,.7); }
.chat-close { background: none; border: none; color: rgba(255,255,255,.8); font-size: 1rem; cursor: pointer; }
.chat-close:hover { color: #fff; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: .89rem; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg-bot { background: var(--section-alt); color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-user { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-typing { color: var(--text-muted); font-style: italic; }
.chat-input-row {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border);
}
.chat-input-row input {
  flex: 1; background: var(--input-bg); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: .9rem; font-family: var(--font); color: var(--text);
}
.chat-input-row input:focus { outline: none; border-color: var(--blue); }
.chat-send {
  background: var(--blue); color: #fff; border: none; border-radius: 10px;
  width: 44px; cursor: pointer; font-size: 1rem; transition: background .2s;
}
.chat-send:hover { background: var(--blue-hover); }
.chat-send:disabled { opacity: .5; cursor: wait; }

/* ── Mobile ─────────────────────────────── */
@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; background: var(--nav-bg);
    flex-direction: column; gap: 0; padding: 10px 0; display: none;
    border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(12px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 24px; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .hero { padding: 120px 20px 70px; }
  .hero-top { flex-direction: column-reverse; gap: 32px; text-align: center; }
  .hero-ctas, .hero-contact { justify-content: center; }
  .hero-photo img { width: 170px; height: 170px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
