/* ==========================================================================
   Phil.contact — Philip Emanuele
   Design tokens
   ========================================================================== */

:root {
  --navy:       #03101E;
  --navy-2:     #061726;
  --navy-3:     #0B1C2C;
  --ink:        #0B1729;
  --ink-soft:   #3C4C60;
  --ink-mute:   #5B6B7E;
  --paper:      #F7F8F9;
  --paper-2:    #ECF0F3;
  --white:      #FFFFFF;

  --text:       #0B1729;
  --text-soft:  #4B5A61;
  --muted:      #6C7C83;

  --on-dark:        #EAF1F7;
  --on-dark-soft:   #A9BECD;
  --on-dark-mute:   #7E93A3;

  --blue:       #0B90FB;
  --blue-hi:    #35AEFE;
  --blue-deep:  #0272DF;
  --cyan:       #22D9F0;
  --sky:        #4FC8FA;

  --green:      #5FDD8B;
  --purple:     #BE7CE8;

  --line:       #DDE5E2;
  --line-dark:  rgba(255,255,255,.12);

  --radius-s:   10px;
  --radius:     16px;
  --radius-l:   24px;

  --shadow-s:   0 1px 2px rgba(12,17,20,.06), 0 4px 14px rgba(12,17,20,.05);
  --shadow-m:   0 2px 6px rgba(12,17,20,.06), 0 18px 44px rgba(12,17,20,.09);
  --shadow-l:   0 30px 80px rgba(3,16,30,.45);
  --shadow-btn: 0 1px 2px rgba(2,40,80,.25), 0 10px 26px rgba(11,144,251,.32);

  --wrap:       1400px;
  --header-h:   78px;
  --ease:       cubic-bezier(.22,.61,.36,1);
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, select, textarea, button { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 3vw, 2.75rem);
}

.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;
}

[id] { scroll-margin-top: calc(var(--header-h) + 1.25rem); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .82rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease);
}

.btn svg { width: 18px; height: 18px; flex: none; }
.btn .arw { transition: transform .22s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }

.btn-sm { padding: .6rem 1.35rem; font-size: .9rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, var(--blue-hi) 0%, var(--blue) 55%, var(--blue-deep) 100%);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(2,40,80,.25), 0 14px 32px rgba(11,144,251,.42);
}

.btn-outline {
  background: rgba(11,144,251,.07);
  color: var(--white);
  box-shadow: inset 0 0 0 1.5px rgba(53,174,254,.75);
}

.btn-outline:hover {
  background: rgba(11,144,251,.16);
  box-shadow: inset 0 0 0 1.5px var(--blue-hi);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px #B9C4D2;
}

.btn-ghost:hover {
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1.05rem;
  min-width: 0;
}

.brand-mark { width: 68px; height: auto; }

.brand-name {
  font-size: clamp(.86rem, 1.46vw, 1.32rem);
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--white);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.6rem);
}

.nav-link {
  position: relative;
  padding: .35rem 0;
  font-size: clamp(.9rem, 1.16vw, 1.04rem);
  font-weight: 500;
  color: rgba(255,255,255,.86);
  transition: color .18s var(--ease);
}

.nav-link:hover { color: var(--white); }

.nav-link.is-current { color: var(--white); }

.nav-link.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--cyan);
}

.nav .btn { margin-left: .4rem; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(440px, 36.6vw, 620px);
  padding-block: var(--header-h) clamp(2.5rem, 4.2vw, 4.25rem);
  background: var(--navy);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 45%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3,16,30,.60) 0%, rgba(3,16,30,.12) 26%, rgba(3,16,30,0) 44%),
    linear-gradient(92deg, rgba(3,16,30,.84) 0%, rgba(3,16,30,.66) 26%, rgba(3,16,30,.26) 52%, rgba(3,16,30,.02) 76%),
    linear-gradient(0deg, rgba(3,16,30,.38) 0%, rgba(3,16,30,0) 34%);
}

.hero-inner { width: 100%; max-width: var(--wrap); }

.hero-title {
  font-size: clamp(2.6rem, 4.9vw, 4.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--white);
  text-shadow: 0 2px 30px rgba(3,16,30,.5);
}

.hero-role {
  margin-top: .85rem;
  font-size: clamp(1.22rem, 2.5vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--sky);
  text-shadow: 0 2px 22px rgba(3,16,30,.45);
}

.hero-role .sep { color: rgba(79,200,250,.6); padding-inline: .18em; }

.hero-lede {
  margin-top: 1.05rem;
  font-size: clamp(1rem, 1.67vw, 1.58rem);
  font-weight: 400;
  color: rgba(255,255,255,.94);
  text-shadow: 0 2px 18px rgba(3,16,30,.5);
}

.hero .btn { margin-top: 1.75rem; }

/* ==========================================================================
   Sections + shared type
   ========================================================================== */

.section { padding-block: clamp(1.75rem, 2.9vw, 3rem); }
.section-dark { background: var(--navy); }
.section-light { background: var(--paper); }
.section-about { background: var(--navy-3); padding-block: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
  gap: clamp(2rem, 3vw, 3rem);
  align-items: start;
}

.split-aside { padding-top: .35rem; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.eyebrow .rule {
  width: 2.1rem;
  height: 2.5px;
  flex: none;
  border-radius: 2px;
  background: var(--cyan);
}

.eyebrow--ink { color: #56687F; }
.eyebrow--ink .rule { background: #10A6EF; }

.eyebrow--center { justify-content: center; color: rgba(255,255,255,.82); }

.h2 {
  margin-top: 1.15rem;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.032em;
  color: var(--white);
}

.h2--ink { color: var(--ink); }
.h2--center { text-align: center; }

.lede {
  margin-top: 1.15rem;
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
  line-height: 1.68;
  color: var(--on-dark-soft);
}

.lede--ink { font-size: clamp(.93rem, 1.06vw, 1.02rem); color: var(--ink-soft); }

.split-aside .btn { margin-top: 1.9rem; }

/* ==========================================================================
   Project cards
   ========================================================================== */

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.6vw, 1.6rem);
}

.pcard {
  position: relative;
  isolation: isolate;
  display: flex;
  overflow: hidden;
  min-height: 23.5rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 22px 50px rgba(0,0,0,.38);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.pcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 30px 64px rgba(0,0,0,.5);
}

.pcard-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.pcard-tint {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.pcard--green .pcard-tint {
  background: linear-gradient(180deg,
    rgba(6,26,16,.15) 0%, rgba(6,26,16,.55) 34%,
    rgba(6,26,16,.93) 58%, rgba(6,26,16,.99) 76%);
}

.pcard--blue .pcard-tint {
  background: linear-gradient(180deg,
    rgba(0,25,48,.12) 0%, rgba(0,25,48,.52) 34%,
    rgba(0,25,48,.93) 58%, rgba(0,25,48,.99) 76%);
}

.pcard--purple .pcard-tint {
  background: linear-gradient(180deg,
    rgba(8,23,46,.14) 0%, rgba(8,23,46,.54) 34%,
    rgba(8,23,46,.93) 58%, rgba(8,23,46,.99) 76%);
}

.pcard-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: clamp(.95rem, 1.3vw, 1.2rem);
  padding-top: clamp(1rem, 1.7vw, 1.5rem);
  text-align: center;
}

.pcard-icon {
  width: clamp(80px, 8.4vw, 124px);
  height: auto;
}

.pcard-name {
  margin-top: -.6rem;
  font-size: clamp(.88rem, 1.35vw, 1.3rem);
  font-weight: 700;
  letter-spacing: .075em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--white);
}

.pcard-tag {
  margin-top: .35rem;
  font-size: clamp(.9rem, 1.15vw, 1.12rem);
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255,255,255,.93);
}

.pcard-copy {
  margin-top: 1.25rem;
  font-size: .91rem;
  line-height: 1.62;
  color: rgba(226,238,248,.82);
  text-align: left;
  align-self: stretch;
}

.pcard-more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: 1.25rem;
  align-self: flex-start;
  font-size: clamp(.88rem, 1.05vw, 1.02rem);
  font-weight: 600;
}

.pcard-more svg { width: 17px; height: 17px; transition: transform .22s var(--ease); }
.pcard:hover .pcard-more svg { transform: translateX(4px); }

.pcard--green  .pcard-more { color: var(--green); }
.pcard--blue   .pcard-more { color: var(--sky); }
.pcard--purple .pcard-more { color: var(--purple); }

/* ==========================================================================
   Skills grid
   ========================================================================== */

.skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.6rem, 2.6vw, 2.6rem) clamp(1rem, 2vw, 2rem);
  padding-top: .5rem;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .95rem;
  text-align: center;
}

.skill img {
  width: clamp(44px, 3.9vw, 56px);
  height: clamp(44px, 3.9vw, 56px);
  object-fit: contain;
}

.skill span {
  font-size: clamp(.88rem, 1.07vw, 1.03rem);
  line-height: 1.42;
  color: var(--ink);
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  align-items: center;
  gap: clamp(2rem, 3.6vw, 3.6rem);
}

.about-media { position: relative; }

.about-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: 50% 42%;
}

.about-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: clamp(1.5rem, 2.2vw, 2rem);
  max-width: 40rem;
}

.about-body .prose {
  margin-top: 1.15rem;
  font-size: clamp(.95rem, 1.15vw, 1.08rem);
  line-height: 1.7;
  color: var(--on-dark-soft);
}

.about-body .prose strong { color: var(--white); font-weight: 600; }
.about-body .btn { margin-top: 2rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-2);
}

.foot-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.foot-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4,20,38,.72) 0%, rgba(4,20,38,.58) 45%, rgba(3,14,26,.88) 100%);
}

.foot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(2rem, 3.2vw, 2.9rem) clamp(1.15rem, 1.6vw, 1.5rem);
}

.foot-inner .h2 { margin-top: 1rem; font-size: clamp(1.42rem, 2.05vw, 1.95rem); }

.foot-lede {
  margin-top: .6rem;
  font-size: clamp(.98rem, 1.15vw, 1.1rem);
  color: rgba(255,255,255,.88);
}

.foot-inner > .btn { margin-top: 1.05rem; }

.foot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: clamp(1.4rem, 2.1vw, 2rem);
}

.foot-facts {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  flex-wrap: wrap;
}

.foot-fact {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: clamp(.84rem, .92vw, .88rem);
  color: rgba(233,242,250,.88);
  transition: color .18s var(--ease);
}

a.foot-fact:hover { color: var(--white); }
.foot-fact svg { width: 17px; height: 17px; flex: none; opacity: .9; }

.foot-social {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: rgba(255,255,255,.9);
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.foot-social a:hover {
  background: rgba(255,255,255,.12);
  color: var(--white);
  transform: translateY(-1px);
}

.foot-social svg { width: 21px; height: 21px; }

.foot-credit {
  width: 100%;
  margin-top: clamp(1.1rem, 1.6vw, 1.5rem);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .8rem;
  color: rgba(210,226,239,.62);
  text-align: center;
}

.foot-credit a { text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Contact drawer
   ========================================================================== */

.drawer { display: none; }

.drawer:target {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 90;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,12,22,.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(32rem, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(2.25rem, 3.4vw, 3rem) clamp(1.75rem, 2.8vw, 2.75rem) 3rem;
  background: var(--navy-3);
  box-shadow: var(--shadow-l);
  animation: drawer-in .32s var(--ease) both;
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-panel { animation: none; }
  html { scroll-behavior: auto; }
}

.drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--on-dark-soft);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}

.drawer-close:hover { background: rgba(255,255,255,.09); color: var(--white); }
.drawer-close svg { width: 20px; height: 20px; }

.drawer-title {
  margin-top: 1rem;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--white);
}

.drawer-lede {
  margin-top: .6rem;
  font-size: .95rem;
  color: var(--on-dark-soft);
}

.drawer form { margin-top: 1.9rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field { display: flex; flex-direction: column; gap: .42rem; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--on-dark-soft);
}

.field .opt { font-weight: 400; color: var(--on-dark-mute); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .72rem .9rem;
  font-size: .95rem;
  color: var(--white);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-s);
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}

.field textarea { resize: vertical; min-height: 7rem; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--on-dark-soft) 50%),
                    linear-gradient(135deg, var(--on-dark-soft) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 1.15rem, calc(100% - .8rem) 1.15rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field select option { color: var(--ink); background: var(--white); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  background: rgba(255,255,255,.09);
  border-color: var(--blue-hi);
  box-shadow: 0 0 0 3px rgba(11,144,251,.22);
}

.drawer form .btn { margin-top: 1.5rem; }

.drawer-alt {
  margin-top: 1.5rem;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--on-dark-mute);
}

.drawer-alt a { color: var(--sky); text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   Centred modal — the Freewave companies
   ========================================================================== */

.modal { display: none; }

.modal:target {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,12,22,.74);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.75rem, 2.6vw, 2.4rem);
  text-align: center;
  border-radius: var(--radius-l);
  background: var(--navy-3);
  box-shadow: var(--shadow-l);
  animation: modal-in .26s var(--ease) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-panel { animation: none; }
}

.modal-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  color: var(--on-dark-soft);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}

.modal-close:hover { background: rgba(255,255,255,.09); color: var(--white); }
.modal-close svg { width: 20px; height: 20px; }

.modal-mark { width: 66px; height: auto; margin-inline: auto; }

.modal-title {
  margin-top: .5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
}

.modal-list {
  display: grid;
  gap: .6rem;
  margin-top: 1.6rem;
  text-align: left;
}

.modal-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: .35rem .9rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.modal-list a:hover {
  background: rgba(11,144,251,.12);
  border-color: rgba(53,174,254,.55);
  transform: translateY(-1px);
}

.ml-icon {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  align-self: center;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  border-radius: 6px;
}

.ml-text {
  grid-column: 2 / 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .5rem;
  row-gap: .1rem;
}

.ml-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--white);
}

.ml-desc {
  font-size: .87rem;
  line-height: 1.55;
  color: var(--on-dark-soft);
}

.ml-desc::before {
  content: "\2013";
  margin-right: .5rem;
  color: var(--on-dark-soft);
}

.modal-list svg {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
  align-self: center;
  width: 18px;
  height: 18px;
  color: var(--sky);
}

/* ==========================================================================
   Desktop breakpoints
   ========================================================================== */

@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
  .skills { gap: 1.5rem 1.25rem; }
  .pcard { min-height: 24rem; }
}

@media (max-width: 1020px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-aside { max-width: 34rem; }
  .h2 br { display: none; }
  .brand-name { font-size: .92rem; letter-spacing: .2em; }
  .nav { gap: 1.15rem; }
  .nav-link { font-size: .92rem; }
}

@media (max-width: 860px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-body { max-width: none; }
  .foot-meta { justify-content: center; }
}

@media (max-width: 760px) {
  .nav-link { display: none; }
  .hero { min-height: 26rem; }
}

/* ==========================================================================
   Mobile contact card — replaces the full page on phones
   ========================================================================== */

.mcard,
.qr-modal,
.reach-sheet { display: none; }

@media (max-width: 720px) {
  body { background: var(--white); color: var(--text); }

  .site-header,
  .site-footer,
  .drawer,
  .drawer:target,
  .modal,
  .modal:target,
  main > section:not(.mcard) { display: none; }

  .mcard { display: block; }

  .mcard-banner {
    height: 8.5rem;
    background: var(--navy);
  }

  .mcard-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 58%;
  }

  .mcard-body { padding: 0 clamp(1.15rem, 5vw, 1.75rem) 2.75rem; }

  .mcard-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: -3.25rem;
  }

  .mcard-avatar {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 50%;
    border: 4px solid var(--white);
    background: var(--paper-2);
    box-shadow: var(--shadow-s);
  }

  .mcard-actions {
    position: relative;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.625rem;
  }

  .mcard-qr-btn,
  .mcard-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    font: inherit;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-s);
  }

  .mcard-qr-btn svg,
  .mcard-share-btn svg { width: 26px; height: 26px; }

  .mcard-share-note {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    white-space: nowrap;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    font-size: .72rem;
  }

  .mcard-ident {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .85rem;
    margin-top: 1.1rem;
  }

  .mcard-ident-text { min-width: 0; }

  .mcard-name {
    font-size: clamp(1.25rem, 7vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -.03em;
  }

  .mcard-role {
    margin-top: .3rem;
    font-size: .93rem;
    line-height: 1.5;
    color: var(--text-soft);
  }

  .mcard-reach {
    flex: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .15rem;
  }

  .mcard-reach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-s);
    text-decoration: none;
  }

  .mcard-reach-btn svg { width: 26px; height: 26px; }

  .mcard-add { width: 100%; margin-top: 1.6rem; }

  .mcard-links {
    display: grid;
    gap: .55rem;
    margin-top: 1.6rem;
  }

  .mcard-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--white);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
  }

  .mcard-link-icon {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    object-fit: contain;
    border-radius: 5px;
  }

  .mcard-link-name { flex: 1; min-width: 0; }

  .mcard-links svg { width: 15px; height: 15px; flex: none; color: var(--muted); }

  .mcard-credit {
    margin-top: 1.75rem;
    text-align: center;
    font-size: .76rem;
    color: var(--muted);
  }

  .mcard-credit a { text-decoration: underline; text-underline-offset: 2px; }

  .qr-modal:target {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
  }

  .qr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 14, .78);
  }

  .qr-panel {
    position: relative;
    width: 100%;
    max-width: 23rem;
    padding: 1.5rem;
    border-radius: var(--radius-l);
    background: var(--white);
    box-shadow: 0 30px 80px rgba(12,17,20,.20);
    text-align: center;
  }

  .qr-panel img { width: 100%; height: auto; }

  .qr-close {
    position: absolute;
    top: .55rem;
    right: .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    color: var(--text-soft);
    text-decoration: none;
  }

  .qr-close svg { width: 20px; height: 20px; }

  .qr-caption {
    margin-top: .9rem;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: -.01em;
  }

  .reach-sheet:target {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: flex-end;
    justify-content: center;
  }

  .reach-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 14, .55);
  }

  .reach-panel {
    position: relative;
    width: 100%;
    max-width: 26rem;
    margin: 0 .75rem .75rem;
    border-radius: var(--radius-l);
    background: var(--white);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(12,17,20,.28);
  }

  .reach-number {
    padding: 1rem 1.15rem .65rem;
    text-align: center;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .reach-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.15rem;
    border-top: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
  }

  .reach-row svg {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--navy);
  }

  .reach-row-text { flex: 1; }

  .reach-row-text b {
    display: block;
    font-size: 1rem;
    font-weight: 600;
  }

  .reach-row-text span {
    display: block;
    margin-top: .1rem;
    font-size: .85rem;
    color: var(--text-soft);
  }

  .reach-cancel {
    display: block;
    margin: .5rem;
    padding: .95rem;
    border-radius: var(--radius);
    background: var(--paper-2);
    color: var(--ink);
    text-align: center;
    font-weight: 600;
    text-decoration: none;
  }
}
