/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ---- Tokens ---- */
:root {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --bg-3: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --radius: 12px;
  --max-w: 1100px;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ---- Layout ---- */
.container {
  width: min(var(--max-w), 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding: 6rem 0; }

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.section__sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 3rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--bg-3);
}
.btn--ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--bg-3);
  padding: 0.5rem 1.2rem;
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bg-3);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__links a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav__links a:not(.btn):hover { color: var(--text); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 6rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero__inner { position: relative; z-index: 1; }

.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.hero__heading {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  max-width: 16ch;
}

.accent { color: var(--accent); }

.hero__sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 48ch;
  margin: 0 0 2.5rem;
}

.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-2) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, black 10%, transparent 80%);
  opacity: 0.5;
}

/* ---- Services ---- */
.services { background: var(--bg); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }

.card__icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.card__icon svg { width: 100%; height: 100%; }

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---- Technologies ---- */
.tech { background: var(--bg); }

.tech__categories {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.tech__cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tech__cat-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tech__cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tech__cat-dot--frontend { background: #38bdf8; }
.tech__cat-dot--backend  { background: #4ade80; }
.tech__cat-dot--mobile   { background: #fb923c; }
.tech__cat-dot--data     { background: #f472b6; }
.tech__cat-dot--devops   { background: #a78bfa; }

.tech__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.tech-chip:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.tech-chip__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ---- Products ---- */
.products { background: var(--bg-2); }

.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.product-card--soon {
  opacity: 0.75;
}
.product-card--soon:hover { opacity: 1; }

.product-card__badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
}

.product-card__icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.product-card__icon svg { width: 100%; height: 100%; }

.product-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.product-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---- About ---- */
.about { background: var(--bg-2); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.about__list li { display: flex; gap: 1.25rem; align-items: flex-start; }
.about__list strong { display: block; margin-bottom: 0.25rem; }
.about__list p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.about__bullet {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  margin-top: 2px;
  letter-spacing: 0.05em;
}

/* ---- Code block (decorative) ---- */
.code-block {
  background: var(--bg);
  border: 1px solid var(--bg-3);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

.code-block__bar {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--bg-3);
}
.code-block__bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-3);
}
.code-block__bar span:nth-child(1) { background: #f87171; }
.code-block__bar span:nth-child(2) { background: #fbbf24; }
.code-block__bar span:nth-child(3) { background: #34d399; }

.code-block pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  color: var(--text-muted);
}
.code-block code { display: block; }
.c-kw { color: #818cf8; }
.c-str { color: #34d399; }
.c-fn  { color: #fbbf24; }

/* ---- Contact ---- */
.contact { background: var(--bg); }

.contact__inner { max-width: 600px; }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-row input:focus,
.form-row textarea:focus { border-color: var(--accent); }
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--bg-3); }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--bg-3);
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .about__inner { grid-template-columns: 1fr; }
  .about__visual { display: none; }

  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--bg-3);
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .nav__burger { display: flex; }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

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

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

