/* =================================================================
   TommyTeo.com — stylesheet
   Vanilla CSS port of the original Tailwind design system.
   Light/dark via [data-theme] on <html>.
   ================================================================= */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Light Mode Palette (HSL components) */
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --surface: 0 0% 100%;
  --card: 210 40% 96%;
  --primary: 222 47% 11%;
  --primary-foreground: 210 40% 98%;
  --secondary: 215 19% 35%;
  --accent: 221 83% 53%;
  --accent-foreground: 0 0% 100%;
  --teal: 175 84% 26%;
  --teal-foreground: 0 0% 100%;
  --border: 214 32% 91%;

  --purple: 271 81% 56%;
  --pink: 330 81% 60%;
  --orange: 25 95% 53%;
  --blue400: 213 94% 68%;

  --max-w: 80rem;
  --radius: 0.75rem;
}

:root[data-theme="dark"] {
  --background: 224 41% 7%;
  --foreground: 0 0% 100%;
  --surface: 222 36% 11%;
  --card: 219 35% 15%;
  --primary: 0 0% 100%;
  --primary-foreground: 224 41% 7%;
  --secondary: 214 20% 69%;
  --accent: 213 94% 64%;
  --accent-foreground: 224 41% 7%;
  --teal: 171 100% 41%;
  --teal-foreground: 224 41% 7%;
  --border: 218 31% 20%;

  --purple: 270 95% 75%;
  --pink: 327 87% 70%;
  --orange: 27 96% 61%;
  --blue400: 213 94% 74%;
}

/* color helpers */
.bg { background: hsl(var(--background)); }
.surface { background: hsl(var(--surface)); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

h1,h2,h3,h4,h5,h6 { letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: hsl(var(--accent) / 0.3); color: hsl(var(--accent-foreground)); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.text-gradient {
  background: linear-gradient(90deg, hsl(var(--accent)), hsl(var(--teal)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-secondary { color: hsl(var(--secondary)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 500; font-size: .95rem; line-height: 1;
  padding: .75rem 1.25rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px hsl(var(--primary) / 0.18); }
.btn-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--card)); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--background)); }
.btn-secondary:hover { transform: translateY(-1px); opacity: .92; }
.btn-block { width: 100%; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 1.5rem 0; transition: all .3s ease; background: transparent;
}
.nav.scrolled {
  padding: 1rem 0;
  background: hsl(var(--surface) / 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.25rem; letter-spacing: -.03em; }
.brand svg { transition: transform .3s ease; flex-shrink: 0; }
.brand:hover svg { transform: rotate(12deg) scale(1.1); }
.brand-name { display: none; }
@media (min-width: 640px) { .brand-name { display: inline-block; } }

.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links .links { display: flex; align-items: center; gap: 1.5rem; font-size: .9rem; font-weight: 500; }
.nav-links a.link { color: hsl(var(--secondary)); transition: color .2s; }
.nav-links a.link:hover { color: hsl(var(--foreground)); }
.nav-actions { display: flex; align-items: center; gap: .75rem; border-left: 1px solid hsl(var(--border)); padding-left: 1.5rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: none;
  background: transparent; color: hsl(var(--secondary)); cursor: pointer; transition: all .2s;
}
.icon-btn:hover { background: hsl(var(--card)); color: hsl(var(--foreground)); }
.nav-linkedin { display: none; }
@media (min-width: 1024px) { .nav-linkedin { display: inline-flex; } }

.mobile-toggle { display: flex; align-items: center; gap: .5rem; }
@media (min-width: 768px) { .mobile-toggle { display: none; } }

.mobile-menu {
  display: none; margin-top: 1rem;
  background: hsl(var(--surface) / 0.85); backdrop-filter: blur(12px);
  border-top: 1px solid hsl(var(--border));
}
.mobile-menu.open { display: block; animation: fadeDown .25s ease; }
.mobile-menu .mm-inner { padding: .5rem 1rem 1.5rem; }
.mobile-menu a.link { display: block; padding: 1rem .75rem; font-size: 1rem; font-weight: 500; color: hsl(var(--foreground)); border-radius: var(--radius); }
.mobile-menu a.link:hover { background: hsl(var(--card)); }
.mobile-menu .mm-cta { padding-top: 1rem; margin-top: .5rem; border-top: 1px solid hsl(var(--border)); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* sun/moon visibility */
:root[data-theme="dark"] .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding: 6rem 0; }
.section-pad-sm { padding: 5rem 0; }
.bg-surface { background: hsl(var(--surface)); }
.bg-bg { background: hsl(var(--background)); }
.border-y { border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); }

.section-heading { margin-bottom: 3.5rem; max-width: 42rem; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; margin-bottom: 1rem; }
.section-heading p { font-size: 1.125rem; color: hsl(var(--secondary)); line-height: 1.6; }

/* ---------- Hero ---------- */
.hero { padding: 7rem 0 4rem; overflow: hidden; }
@media (min-width: 768px) { .hero { padding: 9rem 0 6rem; } }
.glow { position: absolute; border-radius: 999px; filter: blur(128px); z-index: -1; pointer-events: none; }
.glow-1 { top: 25%; left: 0; width: 24rem; height: 24rem; background: hsl(var(--accent) / 0.10); }
.glow-2 { bottom: 0; right: 25%; width: 31rem; height: 31rem; background: hsl(var(--teal) / 0.10); }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .375rem .75rem; border-radius: 999px;
  background: hsl(var(--surface)); border: 1px solid hsl(var(--border) / 0.5);
  font-size: .875rem; font-weight: 500; color: hsl(var(--secondary));
  margin-bottom: 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: hsl(var(--accent)); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.hero h1 { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; margin-bottom: 1.25rem; }
.hero .lead { font-size: clamp(1.125rem, 2vw, 1.25rem); color: hsl(var(--secondary)); font-weight: 500; max-width: 36rem; margin-bottom: .75rem; }
.hero .sub { font-size: 1rem; color: hsl(var(--secondary) / 0.85); max-width: 36rem; margin-bottom: 1.75rem; }
.hero-cta { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .hero-cta { flex-direction: row; } }

.hero-visual {
  position: relative; width: 100%; aspect-ratio: 1/1; border-radius: 1.5rem; overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.5); box-shadow: 0 25px 60px hsl(var(--accent) / 0.08);
}
@media (min-width: 1024px) { .hero-visual { aspect-ratio: 4/3; } }
.hero-visual .bgimg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .8; mix-blend-mode: screen; transition: transform .7s ease;
}
.hero-visual:hover .bgimg { transform: scale(1.05); }
.hero-visual .overlay {
  position: absolute; inset: 0; z-index: 1;
  background: hsl(var(--surface) / 0.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.hero-visual .tilt { position: relative; z-index: 2; width: 100%; max-width: 28rem; display: flex; flex-direction: column; gap: 1rem; }

.glass-card {
  background: hsl(var(--card) / 0.85); backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--border) / 0.5); box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: 1rem; border-radius: var(--radius);
  display: flex; align-items: center; gap: 1rem;
}
.glass-card.indent { margin-left: 2rem; }
.gc-icon { padding: .75rem; border-radius: .5rem; display: inline-flex; }
.gc-icon.accent { background: hsl(var(--accent) / 0.2); color: hsl(var(--accent)); }
.gc-icon.teal { background: hsl(var(--teal) / 0.2); color: hsl(var(--teal)); }
.gc-icon.primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--foreground)); }
.gc-title { font-size: .875rem; font-weight: 600; }
.gc-sub { font-size: .75rem; color: hsl(var(--secondary)); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bar { width: 100%; height: 6px; background: hsl(var(--border) / 0.5); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: hsl(var(--accent)); border-radius: 999px; }
.bar.grad > span { background: linear-gradient(90deg, hsl(var(--accent)), hsl(var(--teal))); }

/* ---------- Expertise cards ---------- */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 1rem; padding: 2rem; box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.10); }
.card .ico { width: 56px; height: 56px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; transition: transform .3s; }
.card:hover .ico { transform: scale(1.1); }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }
.card p { color: hsl(var(--secondary)); line-height: 1.6; }

.ico.c-accent { background: hsl(var(--accent) / 0.10); color: hsl(var(--accent)); }
.ico.c-teal { background: hsl(var(--teal) / 0.10); color: hsl(var(--teal)); }
.ico.c-purple { background: hsl(var(--purple) / 0.10); color: hsl(var(--purple)); }
.ico.c-pink { background: hsl(var(--pink) / 0.10); color: hsl(var(--pink)); }
.ico.c-orange { background: hsl(var(--orange) / 0.10); color: hsl(var(--orange)); }
.ico.c-blue { background: hsl(var(--blue400) / 0.10); color: hsl(var(--blue400)); }
.tcol-accent { color: hsl(var(--accent)); }
.tcol-teal { color: hsl(var(--teal)); }
.tcol-purple { color: hsl(var(--purple)); }
.tcol-pink { color: hsl(var(--pink)); }
.tcol-blue { color: hsl(var(--blue400)); }

/* ---------- Current Role ---------- */
.role-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .role-grid { grid-template-columns: 4fr 8fr; } }
.role-brand {
  aspect-ratio: 1/1; background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 1.5rem; box-shadow: 0 20px 40px rgba(0,0,0,.10);
  padding: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.role-brand .logo { width: 96px; height: 96px; border-radius: 1rem; overflow: hidden; margin-bottom: 1.5rem; box-shadow: 0 20px 40px rgba(0,0,0,.2); transition: transform .5s; background: #000; }
.role-brand:hover .logo { transform: scale(1.05) rotate(3deg); }
.role-brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.role-brand h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: .25rem; }
.role-brand p { font-size: .875rem; color: hsl(var(--secondary)); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem; border-radius: 999px;
  background: hsl(var(--accent) / 0.1); color: hsl(var(--accent)); font-size: .875rem; font-weight: 600; margin-bottom: .5rem;
}
.role-details h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; margin: 1rem 0; }
.role-details > p { font-size: 1.125rem; color: hsl(var(--secondary)); line-height: 1.7; max-width: 48rem; }
.checklist { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.check { display: flex; align-items: flex-start; gap: .75rem; }
.check svg { color: hsl(var(--teal)); margin-top: 2px; flex-shrink: 0; }
.check span { font-weight: 500; color: hsl(var(--foreground) / 0.9); }
.role-foot { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid hsl(var(--border)); display: flex; align-items: center; gap: .75rem; font-size: .875rem; color: hsl(var(--secondary)); font-weight: 500; }
.role-foot svg { color: hsl(var(--accent)); }

/* ---------- Projects ---------- */
.featured {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.6);
  border-radius: 1.5rem; overflow: hidden; box-shadow: 0 25px 50px rgba(0,0,0,.12); margin-bottom: 3rem;
}
.featured .grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .featured .grid { grid-template-columns: 1fr 1fr; } }
.featured .left { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 1024px) { .featured .left { padding: 3rem; } }
.tag-featured {
  display: inline-flex; width: max-content; padding: .25rem .75rem; border-radius: 999px;
  background: hsl(var(--accent) / 0.1); color: hsl(var(--accent));
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.5rem;
}
.featured h3 { font-size: 1.875rem; font-weight: 700; margin-bottom: 1rem; }
.featured .desc { font-size: 1.125rem; color: hsl(var(--secondary)); line-height: 1.7; margin-bottom: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.tag { padding: .375rem .75rem; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: .5rem; font-size: .875rem; font-weight: 500; }
.tag-sm { padding: .25rem .6rem; font-size: .75rem; color: hsl(var(--secondary)); border-radius: .4rem; }

.featured .right { background: hsl(var(--background) / 0.5); padding: 2rem; display: flex; align-items: center; justify-content: center; min-height: 300px; }
@media (min-width: 1024px) { .featured .right { border-left: 1px solid hsl(var(--border)); } }
.mock {
  width: 100%; max-width: 28rem; background: hsl(var(--surface)); border: 1px solid hsl(var(--border));
  box-shadow: 0 25px 50px rgba(0,0,0,.18); border-radius: 1rem; padding: 1.5rem;
  transition: transform .5s;
}
.featured:hover .mock { transform: scale(1.02); }
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid hsl(var(--border)); }
.mock-head .l { display: flex; align-items: center; gap: .75rem; }
.mock-head .av { width: 40px; height: 40px; border-radius: .5rem; background: hsl(var(--accent) / 0.2); color: hsl(var(--accent)); display: flex; align-items: center; justify-content: center; }
.mock-head .t1 { font-weight: 600; }
.mock-head .t2 { font-size: .75rem; color: hsl(var(--secondary)); }
.chip { height: 24px; padding: 0 .6rem; background: hsl(var(--teal) / 0.2); color: hsl(var(--teal)); font-size: .75rem; font-weight: 700; display: flex; align-items: center; border-radius: 999px; }
.mock-rows { display: flex; flex-direction: column; gap: 1rem; }
.mock-row { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; }
.mock-row .k { color: hsl(var(--secondary)); }
.mock-row .v { font-family: ui-monospace, monospace; }

.proj-card { display: flex; flex-direction: column; height: 100%; }
.proj-card:hover { border-color: hsl(var(--accent) / 0.3); }
.proj-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.proj-ico { padding: .75rem; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.proj-link { color: hsl(var(--secondary)); transition: color .2s; }
.proj-link:hover { color: hsl(var(--foreground)); }
.proj-card p { flex: 1; margin-bottom: 1.5rem; }

/* ---------- Tech Stack ---------- */
.tech-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .tech-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1rem; } }
@media (min-width: 1024px) { .tech-grid { gap: 3rem; } }
.tech-col h3 { font-size: .8rem; font-weight: 600; color: hsl(var(--secondary)); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.5rem; text-align: center; }
@media (min-width: 768px) { .tech-col h3 { text-align: left; } }
.tech-tags { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
@media (min-width: 768px) { .tech-tags { justify-content: flex-start; } }
.tech-tag {
  padding: .5rem 1rem; background: hsl(var(--surface)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); font-size: .875rem; font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: all .2s; cursor: default;
}
.tech-tag:hover { transform: translateY(-2px) scale(1.05); border-color: hsl(var(--accent)); color: hsl(var(--accent)); box-shadow: 0 6px 14px rgba(0,0,0,.08); }
.center { text-align: center; margin-bottom: 3rem; }
.center h2 { font-size: clamp(1.75rem,3vw,2rem); font-weight: 700; margin-bottom: 1rem; }
.center p { font-size: 1.125rem; color: hsl(var(--secondary)); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 5fr 7fr; gap: 4rem; } }
.about-photo { position: relative; display: flex; justify-content: center; }
@media (min-width: 1024px) { .about-photo { display: block; } }
.about-photo .frame { aspect-ratio: 4/5; width: 16rem; border-radius: 1.5rem; overflow: hidden; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,.25); }
@media (min-width: 640px) { .about-photo .frame { width: 20rem; } }
@media (min-width: 1024px) { .about-photo .frame { width: 100%; } }
.about-photo .frame img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .frame .grad { position: absolute; inset: 0; background: linear-gradient(to top, hsl(var(--background) / 0.8), transparent 60%); }
.about-photo .avail { position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; padding: 1rem; border-radius: var(--radius); display: flex; align-items: center; gap: .75rem; font-weight: 500; }
.about-photo .avail .dot { background: hsl(var(--teal)); }
.about-glow { position: absolute; z-index: -1; top: 50%; left: -3rem; width: 16rem; height: 16rem; background: hsl(var(--accent) / 0.2); border-radius: 999px; filter: blur(80px); }
.about-text h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; margin-bottom: 1.5rem; line-height: 1.3; }
.about-text > p { font-size: 1.125rem; color: hsl(var(--secondary)); line-height: 1.7; margin-bottom: 2.5rem; }
.about-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .about-cards { grid-template-columns: 1fr 1fr; } }
.about-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; border-radius: 1rem; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); transition: border-color .2s; }
.about-item .ai { padding: .5rem; border-radius: .5rem; margin-top: 2px; }
.about-item h4 { font-weight: 600; margin-bottom: .25rem; }
.about-item p { font-size: .875rem; color: hsl(var(--secondary)); }
.ai.c-accent { background: hsl(var(--accent) / 0.1); color: hsl(var(--accent)); }
.ai.c-teal { background: hsl(var(--teal) / 0.1); color: hsl(var(--teal)); }
.ai.c-purple { background: hsl(var(--purple) / 0.1); color: hsl(var(--purple)); }
.ai.c-orange { background: hsl(var(--orange) / 0.1); color: hsl(var(--orange)); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 48rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.6); border-radius: 1rem; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.25rem 1.5rem; font-size: 1.05rem; font-weight: 600; color: hsl(var(--foreground));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: inherit; }
.faq-q svg { flex-shrink: 0; transition: transform .3s; color: hsl(var(--accent)); }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a .inner { padding: 0 1.5rem 1.25rem; color: hsl(var(--secondary)); line-height: 1.7; }

/* ---------- CTA ---------- */
.cta { padding: 8rem 0; overflow: hidden; }
.cta .grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, hsl(var(--secondary) / 0.07) 1px, transparent 1px),
                    linear-gradient(to bottom, hsl(var(--secondary) / 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, #000 70%, transparent 100%);
}
.cta .glow-c { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 75%; height: 75%; background: hsl(var(--accent) / 0.05); filter: blur(120px); border-radius: 999px; pointer-events: none; }
.cta-inner { max-width: 56rem; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.cta h2 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 900; margin-bottom: 1.5rem; }
.cta p { font-size: clamp(1.125rem, 2.5vw, 1.5rem); color: hsl(var(--secondary)); max-width: 40rem; margin: 0 auto 3rem; font-weight: 500; line-height: 1.6; }
.cta-buttons { display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
@media (min-width: 640px) { .cta-buttons { flex-direction: row; } .cta-buttons .btn { min-width: 200px; } }

/* ---------- Footer ---------- */
.footer { background: hsl(var(--surface)); border-top: 1px solid hsl(var(--border)); padding: 3rem 0; }
.footer-top { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
@media (min-width: 768px) { .footer-top { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-brand { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; justify-content: center; }
@media (min-width: 768px) { .footer-brand { justify-content: flex-start; } }
.footer-mark { width: 24px; height: 24px; border-radius: 6px; background: hsl(var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }
.footer-tag { font-size: .875rem; color: hsl(var(--secondary)); margin-top: .5rem; font-weight: 500; }
.footer-social { width: 40px; height: 40px; border-radius: 999px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); display: flex; align-items: center; justify-content: center; color: hsl(var(--secondary)); transition: all .2s; }
.footer-social:hover { color: hsl(var(--accent)); border-color: hsl(var(--accent)); }
.footer-bottom { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid hsl(var(--border) / 0.5); display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom p { font-size: .875rem; color: hsl(var(--secondary)); }
.footer-bottom .muted { color: hsl(var(--secondary) / 0.6); }

/* ---------- Contact Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; animation: fadeIn .2s ease; }
.modal-backdrop .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.modal {
  position: relative; z-index: 1; width: 100%; max-width: 28rem;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 1rem; box-shadow: 0 30px 60px rgba(0,0,0,.4); overflow: hidden;
  animation: pop .2s ease; max-height: 90vh; overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-head { padding: 1.5rem; border-bottom: 1px solid hsl(var(--border)); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 1.25rem; font-weight: 700; }
.modal-body { padding: 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; }
.field label .req { color: #ef4444; }
.field input, .field textarea {
  width: 100%; padding: .65rem .75rem; border-radius: var(--radius);
  border: 1px solid hsl(var(--border)); background: hsl(var(--background));
  color: hsl(var(--foreground)); font-family: inherit; font-size: .9rem;
  transition: box-shadow .2s; resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: hsl(var(--secondary)); }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 2px hsl(var(--accent)); }
.turnstile-wrap { display: flex; justify-content: center; margin-bottom: 1rem; min-height: 0; }
.form-error { display: flex; align-items: flex-start; gap: .5rem; padding: .75rem; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2); border-radius: var(--radius); font-size: .875rem; color: #dc2626; margin-bottom: 1rem; }
:root[data-theme="dark"] .form-error { color: #f87171; }
.form-success { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding: 2rem 0; }
.form-success svg { color: #22c55e; }
.form-success h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; }
.form-success p { color: hsl(var(--secondary)); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Semantic <ul> lists used for cards/tags/checklists — strip default list styling */
.list-reset { list-style: none; margin: 0; padding: 0; }

/* ---------- Sub-pages (about / projects / contact) ---------- */
.page { padding: 8rem 0 5rem; }
.breadcrumb { font-size: .85rem; color: hsl(var(--secondary)); margin-bottom: 1.5rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: hsl(var(--secondary)); }
.breadcrumb a:hover { color: hsl(var(--accent)); }
.breadcrumb .sep { opacity: .5; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.page .lead { font-size: 1.2rem; color: hsl(var(--secondary)); max-width: 48rem; margin-bottom: 2.5rem; line-height: 1.6; }
.page .lead a, .prose a { color: hsl(var(--accent)); }
.page .lead a:hover, .prose a:hover { text-decoration: underline; }
.prose { max-width: 48rem; }
.prose p { color: hsl(var(--foreground) / .85); line-height: 1.8; margin-bottom: 1.25rem; font-size: 1.05rem; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem; }
.prose ul { margin: 0 0 1.25rem 1.25rem; color: hsl(var(--foreground) / .85); line-height: 1.8; }
.prose ul li { margin-bottom: .4rem; }
.related { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid hsl(var(--border)); max-width: 48rem; }
.related h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.related-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.related-links a { color: hsl(var(--accent)); font-weight: 500; }
.related-links a:hover { text-decoration: underline; }

/* footer internal links */
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .75rem; justify-content: center; }
@media (min-width: 768px) { .footer-links { justify-content: flex-start; } }
.footer-links a { font-size: .875rem; color: hsl(var(--secondary)); }
.footer-links a:hover { color: hsl(var(--accent)); }
