/* ==========================================================================
   Hasibur Rahman — Portfolio
   Vanilla CSS. No framework.

   Contents
   01. Design tokens
   02. Reset & base
   03. Layout primitives
   04. Typography helpers
   05. Buttons & links
   06. Header & navigation
   07. Hero
   08. Sections
   09. About
   10. Skills
   11. Projects
   12. Records (training & education)
   13. Contact
   14. Form
   15. Footer
   16. Wide screens
   17. Motion
   ========================================================================== */

/* ==========================================================================
   01. Design tokens
   ========================================================================== */
:root {
  /* Colour ---------------------------------------------------------------- */
  --ink: #14121f;
  --ink-2: #241f38;
  --paper: #fbfafc;
  --surface: #ffffff;
  --surface-2: #f4f2f8;

  --text: #1a1826;
  --text-2: #5a5872;
  --text-3: #8b899e;
  --text-inverse: #ffffff;
  --text-inverse-2: #b9b5cc;

  --violet: #5b4bd6;
  --violet-deep: #3e2fa8;
  --violet-soft: #efedfb;

  --ember: #e23c2e;
  --ember-deep: #b8281c;
  --ember-soft: #fdeeec;

  --rule: #e6e3ef;
  --rule-strong: #d5d1e4;

  --focus: var(--violet-deep);

  /* Typography ------------------------------------------------------------ */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step-hero: clamp(2.125rem, 1.1rem + 4.6vw, 4rem);
  --step-h2: clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem);
  --step-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-lede: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --step-body: 1rem;
  --step-small: 0.9375rem;
  --step-mono: 0.75rem;

  /* Space ----------------------------------------------------------------- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --section-y: clamp(4rem, 2rem + 7vw, 7.5rem);

  /* Shell ----------------------------------------------------------------- */
  --container: 71.25rem;      /* 1140px */
  --gutter: clamp(1.125rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 4rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20, 18, 31, 0.05);
  --shadow: 0 6px 24px -12px rgba(20, 18, 31, 0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   02. Reset & base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a { color: var(--violet-deep); }

img,
svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

::selection {
  background-color: var(--violet);
  color: var(--text-inverse);
}

/* Visible, consistent keyboard focus everywhere. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* The skip link moves focus here. Outlining the entire main region would be
   a distracting full-page box; the scroll position is the useful feedback. */
#main:focus { outline: none; }

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 100;
  padding: var(--space-sm) var(--space-lg);
  border-radius: 0 0 var(--radius) var(--radius);
  background-color: var(--violet-deep);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translate(-50%, -110%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus-visible {
  outline-offset: -4px;
  transform: translate(-50%, 0);
}

/* Available to screen readers, removed from the visual layout. Used to give
   repeated link text ("View code on GitHub") a unique accessible name. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   03. Layout primitives
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   04. Typography helpers
   ========================================================================== */
.eyebrow {
  margin-bottom: var(--space-md);
  color: var(--violet-deep);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ==========================================================================
   05. Buttons & links
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 2.875rem;
  padding: 0.6875rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease),
              border-color 160ms var(--ease),
              color 160ms var(--ease),
              transform 160ms var(--ease);
}

.btn--primary {
  background-color: var(--violet);
  color: var(--text-inverse);
}

.btn--primary:hover {
  background-color: var(--violet-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--rule-strong);
  background-color: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--violet);
  background-color: var(--surface);
  color: var(--violet-deep);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.75rem;      /* comfortable touch target */
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms var(--ease);
}

.social-link__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.social-link:hover { color: var(--violet-deep); }

/* ==========================================================================
   06. Header & navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background-color: rgba(251, 250, 252, 0.85);
  backdrop-filter: blur(10px);
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  background-color: rgba(251, 250, 252, 0.94);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  flex: none;
  border-radius: var(--radius-sm);
  background-color: var(--ink);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.1rem + 1.1vw, 1.25rem);
}

.nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 0.25rem;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0.25rem;
  bottom: 0.125rem;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease);
}

.nav__link:hover,
.nav__link[aria-current="true"] { color: var(--violet-deep); }

.nav__link:hover::after,
.nav__link[aria-current="true"]::after { transform: scaleX(1); }

/* Toggle is hidden on wide screens and revealed by the nav breakpoint. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background-color: transparent;
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}

.nav-toggle:hover {
  border-color: var(--violet);
  color: var(--violet-deep);
}

.nav-toggle__bars {
  position: relative;
  width: 0.875rem;
  height: 0.5rem;
  flex: none;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: border-color 160ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { border-bottom-color: transparent; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background-color: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav.is-open { display: block; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-xs) var(--gutter) var(--space-md);
  }

  .nav__list li + li { border-top: 1px solid var(--rule); }

  .nav__link {
    padding: 0.875rem 0;
    font-size: 0.8125rem;
  }

  .nav__link::after { display: none; }
}

/* ==========================================================================
   07. Hero
   ========================================================================== */
.hero {
  padding-top: clamp(3rem, 1.5rem + 6vw, 6rem);
  padding-bottom: var(--section-y);
}

.hero__inner {
  display: grid;
  gap: clamp(2.5rem, 1rem + 6vw, 4.5rem);
  align-items: center;
}

.hero__title {
  margin-bottom: var(--space-lg);
  font-size: var(--step-hero);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.hero__lede {
  max-width: 34ch;
  color: var(--text-2);
  font-size: var(--step-lede);
  line-height: 1.65;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.hero__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--rule);
}

/* --- Signature: request lifecycle strip ---------------------------------- */
.lifecycle {
  padding: clamp(1.25rem, 0.75rem + 2vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  box-shadow: var(--shadow);
}

.lifecycle__heading {
  margin-bottom: var(--space-lg);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lifecycle__step {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 1.125rem;
}

.lifecycle__step:last-child { padding-bottom: 0; }

/* Connector line between nodes. */
.lifecycle__step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 1.125rem;
  left: 0.3125rem;
  width: 1px;
  height: calc(100% - 0.75rem);
  background-color: var(--rule-strong);
}

/* Node dot. */
.lifecycle__step::after {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 0;
  width: 0.6875rem;
  height: 0.6875rem;
  border: 2px solid var(--violet);
  border-radius: 50%;
  background-color: var(--surface);
}

.lifecycle__step:last-child::after {
  border-color: var(--violet-deep);
  background-color: var(--violet-deep);
}

.lifecycle__label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

@media (min-width: 62rem) {
  .hero__inner { grid-template-columns: 1.2fr 0.8fr; }
}

/* ==========================================================================
   08. Sections
   ========================================================================== */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-top: 1px solid var(--rule);
}

.section--tinted { background-color: var(--surface-2); }

.section__head {
  max-width: 46ch;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.section__title {
  font-size: var(--step-h2);
  letter-spacing: -0.025em;
}

.section__lede {
  margin-top: var(--space-md);
  color: var(--text-2);
  font-size: var(--step-lede);
  line-height: 1.65;
  text-wrap: pretty;
}

/* ==========================================================================
   09. About
   ========================================================================== */
.about {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: start;
}

.about__body {
  display: grid;
  gap: var(--space-lg);
  max-width: 62ch;
  color: var(--text-2);
  text-wrap: pretty;
}

.about__lede {
  color: var(--text);
  font-size: var(--step-lede);
  font-weight: 500;
  line-height: 1.6;
}

.about__aside {
  padding: clamp(1.25rem, 0.75rem + 2vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
}

/* CSS-drawn stand-in for the profile photo, so no <img> is broken. */
.about__monogram {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  max-width: 10rem;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  background-color: var(--ink);
  color: var(--text-inverse);
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about__photo {
  width: 100%;
  max-width: 10rem;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.about__facts {
  display: grid;
  gap: var(--space-md);
  margin: 0;
}

.about__fact + .about__fact {
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
}

.about__fact dt {
  margin-bottom: var(--space-2xs);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about__fact dd {
  margin: 0;
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.5;
}

@media (min-width: 48rem) {
  .about { grid-template-columns: 1.5fr 1fr; }
}

/* ==========================================================================
   10. Skills
   ========================================================================== */
.skills {
  display: grid;
  gap: var(--space-lg);
}

.skill-group {
  padding: clamp(1.25rem, 0.75rem + 1.5vw, 1.75rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
}

.skill-group__title {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--rule);
  font-size: var(--step-h3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.chip {
  padding: 0.375rem 0.6875rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

@media (min-width: 40rem) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Four across only once each column can hold the longest chip label
   ("Database Normalization") without clipping. */
@media (min-width: 76rem) {
  .skills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   11. Projects
   ========================================================================== */
.projects {
  display: grid;
  gap: var(--space-lg);
}

.project {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  transition: border-color 200ms var(--ease),
              box-shadow 200ms var(--ease),
              transform 200ms var(--ease);
}

.project:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* --- Flagship treatment -------------------------------------------------- */
.project--feature {
  position: relative;
  overflow: hidden;
  padding-top: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}

/* The one place Laravel red appears. */
.project--feature::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background-color: var(--ember);
}

.project__badge {
  align-self: start;
  padding: 0.3125rem 0.625rem;
  border-radius: var(--radius-sm);
  background-color: var(--ember-soft);
  color: var(--ember-deep);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.project--feature .project__title { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem); }

.project__main {
  display: grid;
  gap: var(--space-lg);
}

/* --- Card contents ------------------------------------------------------- */
.project__intro {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}

.project__title {
  font-size: var(--step-h3);
  letter-spacing: -0.02em;
}

.project__kicker {
  margin-top: -0.75rem;   /* pulls the kicker tight under the title */
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project__desc {
  max-width: 62ch;
  color: var(--text-2);
  text-wrap: pretty;
}

.project__label {
  margin: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project__features {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}

.feature-list {
  display: grid;
  gap: var(--space-xs) var(--space-lg);
  font-size: var(--step-small);
}

.feature-list li {
  position: relative;
  padding-left: 1.0625rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* Node dot, echoing the hero lifecycle motif. */
.feature-list li::before {
  content: "";
  position: absolute;
  top: 0.5625rem;
  left: 0;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background-color: var(--violet);
}

.project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule);
}

/* Two columns of features only once each column can hold the longest item
   ("Role-based access control") on one line. */
@media (min-width: 34rem) {
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 48rem) {
  .project__main { grid-template-columns: 1.35fr 1fr; }

  /* Features now sit in a narrower column, so one item per row. */
  .feature-list { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 62rem) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .project--feature { grid-column: 1 / -1; }

  /* Half-width cards regain the room for two columns of features. */
  .project:not(.project--feature) .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   12. Records (training & education)
   ========================================================================== */
.record {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: start;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--violet);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
}

.record__head { max-width: 34ch; }

.record__title {
  margin-bottom: var(--space-xs);
  font-size: var(--step-h3);
}

.record__org {
  color: var(--text);
  font-size: var(--step-small);
  font-weight: 600;
}

.record__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.record__status {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--violet-soft);
  color: var(--violet-deep);
  letter-spacing: 0.12em;
}

.record__body {
  display: grid;
  gap: var(--space-md);
}

.record__label {
  margin: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 48rem) {
  .record { grid-template-columns: 1fr 1.4fr; }

  /* Education has no second column, so its single block spans the card. */
  .record--single { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   13. Contact
   ========================================================================== */
.contact {
  display: grid;
  gap: clamp(2rem, 1rem + 3vw, 3rem);
  align-items: start;
}

.contact__subtitle {
  margin-bottom: var(--space-md);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact__subtitle--spaced { margin-top: var(--space-xl); }

.contact__list {
  display: grid;
  gap: var(--space-sm);
}

.contact-item {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms var(--ease),
              box-shadow 160ms var(--ease),
              transform 160ms var(--ease);
}

.contact-item:hover {
  border-color: var(--violet);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.contact-item__label {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-item__value {
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-item__value--muted {
  color: var(--text-2);
  font-weight: 500;
  font-style: italic;
}

.contact__note {
  max-width: 48ch;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--rule-strong);
  color: var(--text-2);
  font-size: var(--step-small);
  line-height: 1.6;
}

/* ==========================================================================
   14. Form
   ========================================================================== */
.form {
  display: grid;
  gap: var(--space-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
}

.field {
  display: grid;
  gap: var(--space-xs);
}

.field__label {
  font-size: var(--step-small);
  font-weight: 600;
}

.field__input {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.5;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.field__input:hover { border-color: var(--text-3); }

.field__input:focus-visible {
  border-color: var(--violet);
  background-color: var(--surface);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.field__input--area {
  min-height: 8rem;
  resize: vertical;
}

.field__input[aria-invalid="true"] { border-color: var(--ember-deep); }

.field__error {
  color: var(--ember-deep);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
}

.form__submit { justify-self: start; }

.form__status:not(:empty) {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background-color: var(--violet-soft);
  color: var(--violet-deep);
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.5;
}

.form__status.is-error {
  background-color: var(--ember-soft);
  color: var(--ember-deep);
}

@media (min-width: 56rem) {
  .contact { grid-template-columns: 0.85fr 1.15fr; }
}

/* ==========================================================================
   15. Footer
   ========================================================================== */
.footer {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  background-color: var(--ink);
  color: var(--text-inverse-2);

  /* Focus rings need to stay visible against the dark band. */
  --focus: #a99cf5;
}

.footer__inner {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.footer__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-inverse);
}

.footer__role {
  margin-top: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer__links ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;      /* comfortable touch target */
  color: var(--text-inverse-2);
  font-size: var(--step-small);
  text-decoration-color: rgba(185, 181, 204, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}

.footer__links a:hover {
  color: var(--text-inverse);
  text-decoration-color: currentColor;
}

.footer__copyright {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

@media (min-width: 52rem) {
  .footer__inner {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-xl);
  }

  .footer__links ul { justify-content: center; }

  .footer__copyright { text-align: right; }
}

/* ==========================================================================
   16. Wide screens

   On 1600px+ displays the measure is allowed a little more room so the
   four-column skills grid and the feature card breathe. Body copy stays
   capped by its own ch-based max-widths, so lines never get too long.
   ========================================================================== */
@media (min-width: 100rem) {
  :root {
    --container: 76rem;
    --step-body: 1.0625rem;
  }
}

/* ==========================================================================
   17. Motion

   Two effects only. The hero plays one short entrance sequence on load;
   everything below it shares a single quiet fade-up as it scrolls into view.
   Both are removed entirely for visitors who prefer reduced motion.
   ========================================================================== */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Hero entrance ------------------------------------------------------- */
.hero__intro > *,
.lifecycle {
  animation: rise 620ms var(--ease) backwards;
}

.hero__intro > :nth-child(1) { animation-delay: 60ms; }
.hero__intro > :nth-child(2) { animation-delay: 130ms; }
.hero__intro > :nth-child(3) { animation-delay: 200ms; }
.hero__intro > :nth-child(4) { animation-delay: 270ms; }
.hero__intro > :nth-child(5) { animation-delay: 340ms; }
.lifecycle { animation-delay: 300ms; }

.lifecycle__step { animation: rise 500ms var(--ease) backwards; }
.lifecycle__step:nth-child(1) { animation-delay: 420ms; }
.lifecycle__step:nth-child(2) { animation-delay: 480ms; }
.lifecycle__step:nth-child(3) { animation-delay: 540ms; }
.lifecycle__step:nth-child(4) { animation-delay: 600ms; }
.lifecycle__step:nth-child(5) { animation-delay: 660ms; }
.lifecycle__step:nth-child(6) { animation-delay: 720ms; }

/* --- Scroll reveal -------------------------------------------------------
   The hidden state is scoped to .js so that with JavaScript unavailable
   every element simply renders as normal.
   ------------------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  /* Hover lifts are removed rather than merely shortened. */
  .btn:hover,
  .project:hover,
  .contact-item:hover { transform: none; }
}
