/* ==========================================================
   angkonislam.com styles
   Change colors and fonts here. Everything below uses these.
   ========================================================== */
:root {
  /* Colors */
  --bg: #F5F3EE;        /* cream page background */
  --ink: #111111;       /* main text */
  --ink-soft: #3d3d3d;  /* secondary text */
  --line: #111111;      /* borders and hard shadows */
  --accent: #FF5A1F;    /* orange: main buttons */
  --highlight: #FFD23F; /* yellow: highlights, step numbers */
  --on-bright: #111111; /* text on orange or yellow */
  --card: #FFFFFF;      /* card background */
  color-scheme: light;

  /* Fonts */
  --font-head: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --head-weight: 700;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape */
  --border: 3px solid var(--line);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 6px 6px 0 var(--line);
  --shadow-sm: 4px 4px 0 var(--line);

  /* Layout */
  --wrap: 1180px;
  --gutter: 20px;
  --header-h: 68px;
}

/* Yellow and orange surfaces always use dark text */
.btn-primary, .skip-link, .id-open li, .node-agent, .step-num { color: var(--on-bright); }

::selection { background: var(--highlight); color: var(--on-bright); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--highlight);
  border: var(--border);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.btn-primary { background: var(--accent); }
.btn-secondary { background: var(--card); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
}
.header-row .logo { margin-right: auto; min-width: 0; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}
/* Profile picture (DP): the whole avatar inside a round frame */
.dp {
  flex: none;
  border: var(--border);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}
.dp-logo { width: 40px; height: 40px; border-width: 2px; }
.logo-text { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.2rem; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius-sm);
  font: 700 1rem var(--font-body);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  z-index: 60;
}
.menu-btn-bars, .menu-btn-bars::before, .menu-btn-bars::after {
  display: block;
  width: 18px; height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-btn-bars { position: relative; }
.menu-btn-bars::before, .menu-btn-bars::after { content: ""; position: absolute; left: 0; }
.menu-btn-bars::before { top: -6px; }
.menu-btn-bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn-bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Small phones: shorter header so logo, theme switch and menu fit */
@media (max-width: 399px) {
  .logo { gap: 8px; }
  .logo-text { font-size: 1.05rem; }
  .menu-btn { padding: 8px 12px; }
  .id-card, .card { padding: 20px; }
  .dp-card { width: 88px; height: 88px; }
  .id-facts div { grid-template-columns: 82px 1fr; }
  .contact-card { padding: 28px 18px; }
}
@media (max-width: 359px) {
  .menu-btn-label {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Mobile: full-screen menu */
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  padding: 32px var(--gutter);
  display: none;
  flex-direction: column;
  gap: 24px;
}
.site-nav.is-open { display: flex; }
.site-nav ul { display: flex; flex-direction: column; }
.site-nav ul a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-size: 1.75rem;
  text-decoration: none;
  border-bottom: 2px solid var(--line);
}
.nav-cta { align-self: stretch; }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 36px; }
.hero-hello { font-size: 1.0625rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(2.35rem, 9.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 13ch;
}
.hero-sub {
  margin-top: 20px;
  font-size: 1.1875rem;
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}
.hero-proof {
  margin-top: 22px;
  font-size: 0.98rem;
  color: var(--ink-soft);
  max-width: 34em;
}
.hero-proof a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

/* ID card */
.id-card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  align-self: start;
}
.id-top { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--line); }
.dp-card {
  width: 104px; height: 104px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1024px) {
  .dp-card { width: 120px; height: 120px; }
}
.id-name { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.35rem; line-height: 1.15; }
.id-role { color: var(--ink-soft); }
.id-facts { margin: 16px 0 0; display: grid; gap: 8px; }
.id-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.id-facts dt { color: var(--ink-soft); }
.id-facts dd { margin: 0; font-weight: 700; }
.id-open-title { margin-top: 20px; font-weight: 700; }
.id-open { margin-top: 10px; display: grid; gap: 8px; }
.id-open li {
  background: var(--highlight);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 500;
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: var(--border); }
.section-tight { padding: 48px 0; }
.section h2 { font-size: clamp(1.9rem, 6.5vw, 3rem); max-width: 22ch; text-wrap: balance; }
.hero h1 { text-wrap: balance; }
.section-intro { margin-top: 12px; color: var(--ink-soft); font-size: 1.125rem; max-width: 40em; }

.card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h3 { font-size: 1.35rem; margin-bottom: 14px; }

.grid-3 { display: grid; gap: 24px; margin-top: 32px; }

/* Services */
.ticks { display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 12px; height: 12px;
  background: var(--accent);
  border: 2px solid var(--line);
  border-radius: 3px;
}

/* ---------- Work ---------- */
.work-main { margin-top: 32px; display: grid; gap: 28px; padding: 24px; }
/* Phones and tablets: show the TECHcyy screenshot first, then the text */
@media (max-width: 1023px) {
  .work-main-shot { order: -1; }
}
.work-title { font-size: clamp(2rem, 8vw, 3rem) !important; margin-bottom: 4px !important; }
.work-tagline { font-weight: 700; margin-bottom: 14px; }
.work-main-text > p { max-width: 36em; }
.work-main h4 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin: 24px 0 10px; }
.work-main .btn { margin-top: 28px; }


.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
}
a.chip { transition: background-color .15s ease; }
a.chip:hover { background: var(--highlight); color: var(--on-bright); border-color: var(--on-bright); }

/* Browser frame for screenshots */
.browser {
  display: block;
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.browser img { width: 100%; height: auto; }
a.browser:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-sm); }
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: var(--border);
  background: var(--card);
}
.browser-bar i { width: 11px; height: 11px; border: 2px solid var(--line); border-radius: 50%; }
.browser-bar i:first-child { background: var(--accent); }
.browser-bar i:nth-child(2) { background: var(--highlight); }
.browser-bar span { margin-left: 10px; font-size: .85rem; color: var(--ink-soft); }

.work-sub { display: grid; gap: 24px; margin-top: 24px; }
.work-auto > p { margin-bottom: 8px; }
.work-lab p { margin-bottom: 16px; }

/* Automation flows */
.flow-name { margin-top: 20px; font-weight: 700; }
.flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 10px;
}
.node {
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 10px 14px;
  font-weight: 500;
  font-size: .98rem;
  text-align: center;
}
.node-agent { background: var(--highlight); font-weight: 700; }
.link {
  position: relative;
  align-self: center;
  width: 3px;
  height: 22px;
  background: var(--line);
}
.link i {
  position: absolute;
  left: 50%; top: 0;
  width: 9px; height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--line);
  opacity: 0;
}
.flow.is-live .link i { animation: pulse-v 1.6s ease-in-out 3; }
.flow.is-live .link:nth-of-type(4) i { animation-delay: .5s; }
.flow.is-live .link:nth-of-type(6) i { animation-delay: 1s; }
@keyframes pulse-v {
  0% { opacity: 0; transform: translateY(-4px); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(18px); }
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 24px; margin-top: 32px; }
.step-num {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 16px;
  background: var(--highlight);
  border: var(--border);
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-size: 1.35rem;
}

/* ---------- Tools ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tools li {
  padding: 8px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 32px; }
.about-text p { margin-top: 14px; max-width: 36em; }
.about-text p:first-of-type { margin-top: 20px; }
.edu { display: grid; gap: 16px; }
.edu li { padding-bottom: 16px; border-bottom: 2px solid var(--line); }
.edu li:last-child { padding-bottom: 0; border-bottom: 0; }
.edu-school { font-weight: 700; }
.edu li p:not(.edu-school) { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--highlight);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
}
.contact-card { display: grid; gap: 28px; }
.contact-card h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); max-width: 14ch; text-wrap: balance; }
.contact-intro p { margin-top: 12px; font-size: 1.125rem; max-width: 30em; }
.contact-ways { display: grid; gap: 24px; }
/* Let grid children shrink so the email field never pushes the card wider than the screen */
.contact-card > *, .contact-ways > *, .contact-group { min-width: 0; }
.contact-label { font-weight: 700; margin-bottom: 10px; }

/* Email address with a copy button, styled like a filled-in field */
.email-field {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  min-height: 56px;
  padding: 6px 6px 6px 16px;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius-sm);
}
.email-text {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}
/* Small phones: icon-only copy button so the address stays on one line */
@media (max-width: 419px) {
  .email-field { padding-left: 14px; }
  .copy-btn { padding: 0; width: 44px; }
  .copy-btn .copy-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@media (min-width: 420px) {
  .email-text { font-size: 1.0625rem; }
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 8px;
  font: 700 .95rem var(--font-body);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.copy-btn:hover { background: var(--highlight); }
.copy-btn .icon { width: 18px; height: 18px; }
.copy-btn .icon-check { display: none; }
.copy-btn.is-done { background: var(--ink); color: var(--card); }
.copy-btn.is-done .icon-copy { display: none; }
.copy-btn.is-done .icon-check { display: block; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.email-field + .contact-links { margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: var(--border); padding: 28px 0; }
.footer-row { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 700;
  border-radius: 8px;
}
.footer-links a:hover { background: var(--highlight); color: var(--on-bright); }

/* ---------- Hero entrance (runs once on load) ---------- */
.enter { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================
   Tablet: 768px and up
   ========================================================== */
@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 76px; }
  .hero { padding: 64px 0 80px; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .section { padding: 88px 0; }
  .section-tight { padding: 64px 0; }
  .card { padding: 28px; }
  .work-main { padding: 32px; }
  .work-sub { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .contact-card { padding: 48px; }
  .contact-links { flex-direction: row; flex-wrap: wrap; }
  .footer-row { flex-direction: row; justify-content: space-between; align-items: center; }

  /* Flows go sideways */
  .flow { flex-direction: row; align-items: stretch; }
  .node { flex: 1 1 0; display: flex; align-items: center; justify-content: center; }
  .link { width: 28px; height: 3px; flex: none; }
  .link i { top: 50%; left: 0; margin: -4.5px 0 0 0; }
  .flow.is-live .link i { animation-name: pulse-h; }
  @keyframes pulse-h {
    0% { opacity: 0; transform: translateX(-4px); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateX(22px); }
  }
}

/* ==========================================================
   Desktop: 1024px and up
   ========================================================== */
@media (min-width: 1024px) {
  /* Inline nav */
  .menu-btn { display: none; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    background: none;
  }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav ul a {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.0625rem;
    border-bottom: 0;
    padding: 10px 12px;
    border-radius: 8px;
  }
  .site-nav ul a:hover { background: var(--highlight); color: var(--on-bright); }
  .nav-cta { align-self: auto; min-height: 46px; padding: 8px 20px; }

  .hero { padding: 88px 0 104px; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: center; }
  .id-card { padding: 28px; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .work-main { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; padding: 40px; align-items: start; }
  .work-sub { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .about-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .contact-card { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
  .contact-ways { gap: 28px; }
}

/* Very small phones: email on its own line, full-width copy button under it */
@media (max-width: 359px) {
  .email-field { flex-wrap: wrap; padding: 10px 12px; }
  .email-text { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; }
  .copy-btn { width: 100%; padding: 0 12px; }
  .copy-btn .copy-text { position: static; width: auto; height: auto; clip: auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .flow .link i { opacity: 0; }
}
