/* ==========================================================================
   Sumon Studio — Theme Stylesheet
   Tokens follow the Sumon Studio Design System (primary/secondary/accent).
   ========================================================================== */

:root{
  --primary:#0F201E;
  --primary-hover:#183430;
  --secondary:#E4E8DE;
  --accent:#CDEB5E;
  --accent-ink:#3C4A12;

  --success:#3F7A4E;
  --warning:#B98A2E;
  --danger:#B3432B;

  --bg:#F3F4EE;
  --surface:#FFFFFF;
  --border:#E2E3DA;
  --border-soft:#EAEBE3;

  --ink:#151614;
  --ink-muted:#6B6D64;
  --ink-faint:#9A9C90;

  --r-sm:6px; --r-md:10px; --r-lg:14px; --r-pill:999px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:44px; --sp-8:64px;

  --font-display:'Space Grotesk', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'IBM Plex Mono', monospace;

  --shadow-sm:0 1px 2px rgba(15,32,30,0.04);
  --shadow-md:0 8px 24px -8px rgba(15,32,30,0.14);
  --maxw:1180px;
  --ease:cubic-bezier(.4,0,.2,1);
}

*,*::before,*::after{ box-sizing:border-box; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:.01ms !important; transition-duration:.01ms !important; } }

html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; height:auto; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; }
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; color:var(--ink); line-height:1.15; margin:0; }

.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 32px; }
@media (max-width:640px){ .wrap{ padding:0 20px; } }

.eyebrow{
  font-family:var(--font-mono); font-size:12px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--accent-ink); display:flex; align-items:center; gap:10px; margin-bottom:16px;
}
.eyebrow::before{ content:''; width:16px; height:1px; background:var(--accent-ink); }
.eyebrow.on-dark{ color:var(--accent); }
.eyebrow.on-dark::before{ background:var(--accent); }

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--font-body); font-weight:600; font-size:14px; padding:13px 24px;
  border-radius:var(--r-sm); border:1px solid transparent; cursor:pointer;
  transition:background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--primary); color:#fff; }
.btn-primary:hover{ background:var(--primary-hover); }
.btn-accent{ background:var(--accent); color:var(--accent-ink); }
.btn-accent:hover{ filter:brightness(1.05); }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--border); }
.btn-outline:hover{ border-color:var(--primary); }
.btn-outline.on-dark{ color:#fff; border-color:rgba(255,255,255,.3); }
.btn-outline.on-dark:hover{ border-color:var(--accent); color:var(--accent); }

.tag{
  font-family:var(--font-mono); font-size:11px; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-muted); border:1px solid var(--border); padding:5px 10px; border-radius:var(--r-sm);
}

/* ============ NAV ============ */
.site-header{ position:sticky; top:0; z-index:100; background:rgba(243,244,238,.9); backdrop-filter:blur(10px); border-bottom:1px solid var(--border); }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; padding:20px 32px; max-width:var(--maxw); margin:0 auto; }
.site-logo{ font-family:var(--font-display); font-weight:700; font-size:19px; color:var(--ink); display:flex; align-items:baseline; gap:8px; }
.site-logo span{ color:var(--accent-ink); font-family:var(--font-mono); font-size:11px; letter-spacing:.1em; }
.nav-menu{ display:flex; gap:32px; }
.nav-menu a{ font-size:14px; color:var(--ink-muted); font-weight:500; transition:color .2s var(--ease); }
.nav-menu a:hover, .nav-menu .current-menu-item a{ color:var(--ink); }
.nav-cta{ display:flex; align-items:center; gap:18px; }
.nav-toggle{ display:none; background:none; border:none; cursor:pointer; padding:6px; }
.nav-toggle span{ display:block; width:22px; height:2px; background:var(--ink); margin:5px 0; }

@media (max-width:900px){
  .nav-menu{
    position:fixed; inset:0 0 0 auto; width:78vw; max-width:320px; background:var(--surface);
    flex-direction:column; padding:90px 28px 28px; gap:6px; transform:translateX(100%);
    transition:transform .25s var(--ease); box-shadow:var(--shadow-md);
  }
  .nav-menu.open{ transform:translateX(0); }
  .nav-menu a{ font-size:16px; padding:10px 0; display:block; }
  .nav-toggle{ display:block; }
  .nav-cta .btn span.long{ display:none; }
}

/* ============ HERO (dark banner reused across site) ============ */
.dark-panel{ background:var(--primary); border-radius:var(--r-lg); color:#fff; }

.hero{ padding:90px 0 80px; }
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
@media (max-width:980px){ .hero-grid{ grid-template-columns:1fr; gap:44px; } }
.hero h1{ font-size:clamp(36px,4.4vw,58px); line-height:1.08; margin:6px 0 22px; max-width:16ch; }
.hero h1 em{ font-style:normal; color:var(--accent-ink); background:linear-gradient(transparent 60%, var(--accent) 60%); }
.hero p.lead{ font-size:18px; color:var(--ink-muted); max-width:46ch; margin-bottom:32px; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:36px; }
.hero-socials{ display:flex; gap:20px; flex-wrap:wrap; }
.hero-socials a{ font-family:var(--font-mono); font-size:12px; color:var(--ink-faint); border-bottom:1px solid transparent; padding-bottom:2px; }
.hero-socials a:hover{ color:var(--ink); border-color:var(--accent); }

.hero-panel{ padding:32px; }
.hero-panel .eyebrow{ margin-bottom:14px; }
.stack-line{ display:flex; align-items:center; gap:12px; font-family:var(--font-mono); font-size:13px; color:rgba(255,255,255,.7); padding:11px 0; border-bottom:1px dashed rgba(255,255,255,.12); }
.stack-line:last-child{ border-bottom:none; }
.stack-line b{ color:#fff; font-weight:500; }
.stack-line .status{ margin-left:auto; color:var(--accent); font-size:11px; }
.hero-panel-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:18px; padding-top:16px; border-top:1px solid rgba(255,255,255,.12); font-family:var(--font-mono); font-size:11px; color:rgba(255,255,255,.55); }
.live-dot{ width:7px; height:7px; border-radius:50%; background:var(--accent); display:inline-block; margin-right:8px; }

/* ============ STATS ============ */
.stats{ border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.stats-grid{ display:grid; grid-template-columns:repeat(4,1fr); padding:36px 0; }
.stat{ padding:0 24px; border-left:1px solid var(--border); }
.stat:first-child{ border-left:none; padding-left:0; }
.stat .num{ font-family:var(--font-display); font-size:32px; font-weight:700; }
.stat .label{ font-family:var(--font-mono); font-size:11px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.05em; margin-top:6px; display:block; }
@media (max-width:780px){ .stats-grid{ grid-template-columns:repeat(2,1fr); row-gap:26px; } .stat:nth-child(3){ border-left:none; padding-left:0; } }

/* ============ SECTION ============ */
.section{ padding:96px 0; }
.section.bordered{ border-bottom:1px solid var(--border); }
.section-head{ max-width:640px; margin-bottom:52px; }
.section-head h2{ font-size:clamp(28px,3vw,38px); margin-top:6px; line-height:1.15; }
.section-head p{ color:var(--ink-muted); margin-top:14px; font-size:16px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head.center .eyebrow{ justify-content:center; }

/* ============ CARDS ============ */
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:28px 30px; box-shadow:var(--shadow-sm); transition:box-shadow .2s var(--ease); }
.card:hover{ box-shadow:var(--shadow-md); }

/* ============ SERVICES ============ */
.services-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:900px){ .services-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .services-grid{ grid-template-columns:1fr; } }
.service-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:30px; transition:transform .2s var(--ease), border-color .2s var(--ease); }
.service-card:hover{ transform:translateY(-3px); border-color:var(--primary); }
.service-card .idx{ font-family:var(--font-mono); font-size:11px; color:var(--accent-ink); background:var(--accent); display:inline-block; padding:4px 8px; border-radius:4px; }
.service-card h3{ font-size:20px; margin:16px 0 10px; }
.service-card p{ color:var(--ink-muted); font-size:14px; line-height:1.65; margin-bottom:16px; }
.service-card a{ font-family:var(--font-mono); font-size:12px; color:var(--primary); }

/* ============ WORK GRID ============ */
.filters{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:36px; }
.filter-btn{ font-family:var(--font-mono); font-size:12px; padding:9px 16px; border:1px solid var(--border); border-radius:var(--r-pill); background:var(--surface); color:var(--ink-muted); cursor:pointer; transition:all .2s var(--ease); }
.filter-btn:hover{ border-color:var(--primary); color:var(--ink); }
.filter-btn.active{ background:var(--primary); border-color:var(--primary); color:#fff; }

.work-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
@media (max-width:980px){ .work-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .work-grid{ grid-template-columns:1fr; } }

.project-card{ border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; background:var(--surface); transition:border-color .2s var(--ease), transform .2s var(--ease); display:block; }
.project-card:hover{ border-color:var(--primary); transform:translateY(-3px); }
.project-thumb{ aspect-ratio:4/3; background:var(--secondary); display:flex; align-items:center; justify-content:center; border-bottom:1px solid var(--border); overflow:hidden; }
.project-thumb img{ width:100%; height:100%; object-fit:cover; }
.project-thumb span{ font-family:var(--font-mono); font-size:11px; color:var(--ink-faint); text-transform:uppercase; }
.project-body{ padding:20px 22px 24px; }
.project-body .ptags{ display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.project-body h3{ font-size:19px; margin-bottom:8px; }
.project-body p{ font-size:13.5px; color:var(--ink-muted); margin-bottom:14px; }
.project-link{ font-family:var(--font-mono); font-size:12px; color:var(--primary); }

.empty-note{ margin-top:20px; padding:16px 20px; border:1px dashed var(--border); border-radius:var(--r-md); font-family:var(--font-mono); font-size:12.5px; color:var(--ink-faint); }

/* ============ WHY GRID ============ */
.why-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1px 40px; }
.why-item{ padding:26px 0; border-top:1px solid var(--border); }
.why-item h3{ font-size:16.5px; font-family:var(--font-body); font-weight:600; margin-bottom:8px; display:flex; align-items:center; gap:10px; }
.why-item h3::before{ content:''; width:6px; height:6px; background:var(--accent-ink); border-radius:50%; flex-shrink:0; }
.why-item p{ color:var(--ink-muted); font-size:14px; line-height:1.65; }
@media (max-width:900px){ .why-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .why-grid{ grid-template-columns:1fr; } }

/* ============ TRUST ============ */
.trust-grid{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
@media (max-width:900px){ .trust-grid{ grid-template-columns:1fr; gap:32px; } }
.trust-card .rating{ display:flex; align-items:baseline; gap:10px; margin-bottom:6px; }
.trust-card .n{ font-family:var(--font-display); font-size:38px; color:var(--accent-ink); }
.trust-card .of{ color:var(--ink-faint); font-size:14px; }
.trust-card .stars{ color:var(--accent-ink); font-size:14px; letter-spacing:2px; margin-bottom:16px; }
.trust-card .rev{ font-family:var(--font-mono); font-size:12px; color:var(--ink-muted); }
.trust-note{ margin-top:14px; font-size:12.5px; color:var(--ink-faint); font-family:var(--font-mono); }

/* ============ TESTIMONIALS ============ */
.testimonial-card{ padding:28px; }
.testimonial-card p.quote{ font-family:var(--font-display); font-size:19px; font-weight:500; line-height:1.4; margin-bottom:18px; }
.testimonial-meta{ font-family:var(--font-mono); font-size:12px; color:var(--ink-muted); }

/* ============ FINAL CTA ============ */
.final-cta{ padding:36px; text-align:center; margin:0 auto; }
.final-cta h2{ font-size:clamp(28px,3.6vw,44px); max-width:18ch; margin:0 auto 16px; color:#fff; line-height:1.15; }
.final-cta p{ color:rgba(255,255,255,.7); max-width:48ch; margin:0 auto 30px; font-size:16px; }
.final-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ============ FOOTER ============ */
.site-footer{ padding:64px 0 36px; border-top:1px solid var(--border); margin-top:40px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:44px; margin-bottom:52px; }
@media (max-width:780px){ .footer-grid{ grid-template-columns:1fr 1fr; row-gap:32px; } }
.footer-grid h4{ font-family:var(--font-mono); font-size:11px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.08em; margin-bottom:16px; }
.footer-grid ul{ display:flex; flex-direction:column; gap:10px; }
.footer-grid a{ color:var(--ink-muted); font-size:14px; }
.footer-grid a:hover{ color:var(--primary); }
.footer-brand p{ color:var(--ink-muted); font-size:14px; max-width:34ch; margin-top:14px; line-height:1.6; }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; padding-top:26px; border-top:1px solid var(--border); font-family:var(--font-mono); font-size:12px; color:var(--ink-faint); flex-wrap:wrap; gap:12px; }

/* ============ PAGE HEADER (inner pages) ============ */
.page-header{ padding:64px 0 48px; border-bottom:1px solid var(--border); }
.page-header h1{ font-size:clamp(32px,4vw,48px); margin:8px 0 14px; }
.page-header p{ color:var(--ink-muted); max-width:60ch; font-size:16px; }
.breadcrumb{ font-family:var(--font-mono); font-size:12px; color:var(--ink-faint); margin-bottom:14px; }
.breadcrumb a:hover{ color:var(--primary); }

/* ============ ABOUT ============ */
.about-grid{ display:grid; grid-template-columns:.9fr 1.1fr; gap:56px; }
@media (max-width:900px){ .about-grid{ grid-template-columns:1fr; gap:34px; } }
.about-body p{ color:var(--ink-muted); margin-bottom:18px; font-size:16px; line-height:1.75; }
.about-body p:last-child{ margin-bottom:0; }

/* ============ EXPERIENCE TIMELINE ============ */
.timeline{ max-width:760px; }
.timeline-item{ display:grid; grid-template-columns:140px 1fr; gap:28px; padding:32px 0; border-top:1px solid var(--border); }
.timeline-item:first-child{ border-top:none; }
.timeline-date{ font-family:var(--font-mono); font-size:12.5px; color:var(--ink-faint); }
.timeline-item h3{ font-size:19px; margin-bottom:4px; }
.timeline-item .role{ font-family:var(--font-mono); font-size:12.5px; color:var(--accent-ink); margin-bottom:14px; display:block; }
.timeline-item ul{ display:flex; flex-direction:column; gap:8px; }
.timeline-item li{ font-size:14.5px; color:var(--ink-muted); padding-left:16px; position:relative; }
.timeline-item li::before{ content:''; position:absolute; left:0; top:8px; width:5px; height:5px; background:var(--accent-ink); border-radius:50%; }
@media (max-width:600px){ .timeline-item{ grid-template-columns:1fr; gap:6px; } }

/* ============ SKILLS ============ */
.skills-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:780px){ .skills-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:500px){ .skills-grid{ grid-template-columns:1fr; } }
.skill-group h4{ font-family:var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-faint); margin-bottom:14px; }
.skill-group ul{ display:flex; flex-direction:column; gap:9px; }
.skill-group li{ font-size:14.5px; color:var(--ink); padding-bottom:9px; border-bottom:1px solid var(--border-soft); }

/* ============ CASE STUDY (single-project) ============ */
.cs-hero{ padding:56px 0 44px; border-bottom:1px solid var(--border); }
.cs-meta{ display:flex; gap:28px; flex-wrap:wrap; margin:22px 0 26px; }
.cs-meta div span{ display:block; }
.cs-meta .k{ font-family:var(--font-mono); font-size:10.5px; text-transform:uppercase; color:var(--ink-faint); margin-bottom:4px; }
.cs-meta .v{ font-size:14px; font-weight:600; }
.cs-hero-image{ border-radius:var(--r-lg); overflow:hidden; border:1px solid var(--border); margin-top:32px; aspect-ratio:16/9; background:var(--secondary); display:flex; align-items:center; justify-content:center; }
.cs-hero-image span{ font-family:var(--font-mono); font-size:12px; color:var(--ink-faint); }

.cs-block{ padding:56px 0; border-bottom:1px solid var(--border); }
.cs-block-grid{ display:grid; grid-template-columns:.7fr 1.3fr; gap:48px; }
@media (max-width:860px){ .cs-block-grid{ grid-template-columns:1fr; gap:20px; } }
.cs-block h2{ font-size:24px; }
.cs-block .body p{ color:var(--ink-muted); font-size:16px; line-height:1.75; margin-bottom:16px; }
.cs-block .body ul{ margin-top:12px; }
.cs-block .body li{ font-size:15px; color:var(--ink-muted); padding-left:18px; position:relative; margin-bottom:10px; }
.cs-block .body li::before{ content:''; position:absolute; left:0; top:9px; width:5px; height:5px; background:var(--accent-ink); border-radius:50%; }

.cs-gallery{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:24px; }
@media (max-width:640px){ .cs-gallery{ grid-template-columns:1fr; } }
.cs-gallery img{ border-radius:var(--r-md); border:1px solid var(--border); }

.tech-badges{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }

/* ============ CONTACT ============ */
.contact-grid{ display:grid; grid-template-columns:1fr .8fr; gap:56px; }
@media (max-width:900px){ .contact-grid{ grid-template-columns:1fr; gap:36px; } }
.form-row{ margin-bottom:20px; }
.form-row label{ display:block; font-size:13.5px; font-weight:600; margin-bottom:8px; }
.form-row input, .form-row select, .form-row textarea{
  width:100%; padding:12px 14px; font-family:var(--font-body); font-size:14.5px; color:var(--ink);
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-sm);
  transition:border-color .15s var(--ease);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus{ outline:none; border-color:var(--primary); }
.form-row-2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:520px){ .form-row-2{ grid-template-columns:1fr; } }
.form-success{ background:var(--secondary); border:1px solid var(--border); border-radius:var(--r-md); padding:20px; font-size:14.5px; }
.form-honeypot{ position:absolute; left:-9999px; opacity:0; }
.contact-side .card{ margin-bottom:16px; }
.contact-side .card h4{ font-family:var(--font-mono); font-size:11px; text-transform:uppercase; color:var(--ink-faint); margin-bottom:10px; }
.contact-side .card a{ font-size:15px; font-weight:600; color:var(--ink); }

/* ============ 404 ============ */
.error-404{ padding:120px 0; text-align:center; }
.error-404 h1{ font-size:clamp(60px,10vw,120px); color:var(--secondary); -webkit-text-stroke:2px var(--ink); }
.error-404 h2{ font-size:26px; margin:18px 0 12px; }
.error-404 p{ color:var(--ink-muted); margin-bottom:28px; }
.error-links{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ============ BLOG ============ */
.blog-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
@media (max-width:900px){ .blog-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .blog-grid{ grid-template-columns:1fr; } }
.post-card{ border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; background:var(--surface); }
.post-card .thumb{ aspect-ratio:16/10; background:var(--secondary); }
.post-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.post-card .body{ padding:20px 22px 24px; }
.post-card .meta{ font-family:var(--font-mono); font-size:11px; color:var(--ink-faint); margin-bottom:10px; }
.post-card h3{ font-size:18px; margin-bottom:8px; }
.post-card p{ font-size:13.5px; color:var(--ink-muted); }

.single-content{ max-width:760px; }
.single-content p{ margin-bottom:20px; font-size:17px; line-height:1.8; color:var(--ink); }
.single-content h2{ margin:36px 0 14px; font-size:26px; }
.single-content h3{ margin:28px 0 12px; font-size:20px; }
.single-content img{ border-radius:var(--r-md); margin:24px 0; }
.single-content ul, .single-content ol{ margin-bottom:20px; padding-left:22px; }
.single-content li{ margin-bottom:8px; font-size:16px; color:var(--ink-muted); }

/* accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline:2px solid var(--primary); outline-offset:2px;
}
.skip-link{ position:absolute; left:-9999px; top:0; background:var(--primary); color:#fff; padding:12px 20px; z-index:200; }
.skip-link:focus{ left:12px; top:12px; }

/* ============ FAQ (details/summary) ============ */
details summary::-webkit-details-marker{ display:none; }
details summary{ position:relative; padding-right:28px; }
details summary::after{
  content:'+'; position:absolute; right:0; top:0; font-family:var(--font-mono);
  font-size:18px; color:var(--ink-faint); transition:transform .2s var(--ease);
}
details[open] summary::after{ content:'–'; }
