:root{
  --bg-primary: #F6F7F8;
  --bg-secondary: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --border-subtle: #D2D2D7;
  --card-blend-tint: rgba(245,245,247,0.34);
  --card-image-filter: saturate(0.82) contrast(1.02);
}


/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html{ scroll-behavior: smooth; }

:root{
  --padX: clamp(18px, 4vw, 56px);
  --padY: clamp(16px, 3vw, 40px);
  --muted: #2a2a2a;

  --dark: #0c0c0e;
  --darkText: #f2f2f2;
  --darkMuted: rgba(255,255,255,0.72);
  --darkLine: rgba(255,255,255,0.12);

  --line: rgba(0,0,0,0.10);
  --soft: rgba(0,0,0,0.06);
}

body{
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family:"Reddit Mono";
}

.brand__name,
.hero__bgword{
  font-family:"Inter" , "Reddit Mono";
}
.loader__code,
.project-card__num{
  font-family: "Reddit Mono", monospace;
}

#home, #about, #services, #projects, #stack, #contact{
  scroll-margin-top: 30px;
}

/* ---------- Top Bar ---------- */
.topbar{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--padY) var(--padX);
  min-height: 140px;
}

/* ✅ FIX: allow graceful wrap on “almost tablet / scaled screens” (behave like iPad mini) */
.topbar{
  flex-wrap: wrap;
  row-gap: 10px;
  column-gap: 14px;
}

.brand{
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
}

.brand__name{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
  font-size: clamp(64px, 12vw, 200px);
}

.brand__tag{
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 18px;
  letter-spacing: 0.3px;
}

.topbar__right{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 18px;
}

/* ✅ FIX: keep time + location readable (no ugly breaks) */
.topbar__right{
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
  max-width: 100%;
}
.topbar__city,
.topbar__time{
  white-space: nowrap;
}

.dot{ opacity: 0.8; }

/* ✅ FIX: tablet-ish widths (incl. iPad Pro / Surface Pro / Nest Hub Max emulation)
   -> behave like iPad mini: move the right info onto its own clean line if needed */
/* Tablet-ish: allow wrap, but DON'T force a new row */
@media (max-width: 1180px){
  .topbar{
    align-items: flex-end; /* pulls right info closer to nav row */
  }

  .topbar__right{
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;           /* ✅ key: don't force 100% */
    margin-top: 0;         /* ✅ key: remove big drop */
    font-size: 12px;
    gap: 8px;
  }

  .topbar__city,
  .topbar__time{ white-space: nowrap; }

  .dot{ display: inline; } /* keep it (optional) */
}

/* If it STILL can’t fit on one line at some widths, THEN move it to its own line */
@media (max-width: 980px){
  .topbar__right{
    width: 100%;
    justify-content: flex-start;
    margin-top: 6px; /* small, close to nav */
  }
  .dot{ display: none; }
}



/* ✅ Nest Hub Max / wide tablet: keep the right info close to the nav row */
@media (max-width: 1400px){
  .topbar{
    align-items: flex-end;   /* pulls items down to the same baseline */
  }

  .topbar__right{
    margin-top: 0 !important;   /* remove the big drop */
    padding-bottom: 6px;        /* small controlled spacing instead */
    align-self: flex-end;       /* stick it to the bottom of the header */
  }
}

/* ---------- HERO ---------- */
.hero{
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 140px);

  padding: 0 var(--padX);
  padding-top: clamp(18px, 3vh, 32px);
  padding-bottom: clamp(40px, 6vh, 80px);

  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  gap: clamp(18px, 5vw, 70px);
  align-items: end;
}

.hero__bgword{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__bgword span{
  position: absolute;
  left: clamp(140px, 18vw, 260px);
  top: 20%;
  transform: translateY(-50%);

  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.8;
  font-size: clamp(140px, 18vw, 410px);

  color: #000;
  opacity: 0.10;
  white-space: nowrap;
}

.hero__left, .hero__media, .hero__right{
  position: relative;
  z-index: 2;
}

.hero__left{
  padding-bottom: clamp(8px, 1.8vh, 18px);
}

.hero__right{
  padding-bottom: clamp(18px, 4vh, 60px);
  padding-left: clamp(38px, 3vw, 70px);
}

.hero__title{
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(26px, 3vw, 56px);
  transform: translateY(-48px);
}

/* ✅ FIX: prevent “cut off” caption/title on some scaled tablet widths */
@media (max-width: 1180px){
  .hero__title{ transform: translateY(-18px); }
}

.hero__media{
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  z-index: 3;

  background: transparent;
  padding: 0;
}

.hero__media img{ 
  width: min(420px, 34vw); 
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  filter: grayscale(1) contrast(.9) brightness(0.96);
  opacity: 0.85;
  box-shadow: 0 0px 00px rgba(0,0,0,0.05);
}

/* ---------- Pill Nav ---------- */
.nav__inner{
  display: inline-flex;
  align-items: center;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  gap: 8px;
}

.nav__link{
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.9px;
  color: #222;
  padding: 10px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease;
}

.nav__link:hover{ background: rgba(0,0,0,0.06); }
.nav__link.is-active{ background: #111; color: #fff; }

/* screen-reader only */
.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;
}

/* Hamburger button */
.nav__toggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  cursor: pointer;
  position: relative;
}

.nav__toggleBars{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 2px;
  background: #111;
  border-radius: 999px;
}

.nav__toggleBars::before,
.nav__toggleBars::after{
  content:"";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #111;
  border-radius: 999px;
}

.nav__toggleBars::before{ top: -6px; }
.nav__toggleBars::after{ top: 6px; }

/* Mobile drawer */
.nav__drawer{
  position: absolute;
  right: 0;
  top: calc(50% + 10px);
  width: min(220px, 70vw);
  background: rgba(255, 255, 255, 0.734);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 15px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.12);
  padding: 10px;
  z-index: 1200;

  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav__drawer.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;

  display: grid;
  gap: 8px;
}

.nav__mLink{
  text-decoration: none;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 12px 12px;
  border-radius: 12px;
  transition: background 160ms ease;
}

.nav__mLink:hover{ background: rgba(0,0,0,0.06); }
.nav__mLink.is-active{ background: #111; color: #fff; }

/* ---------- ABOUT (dark) ---------- */
.about{
  background: var(--dark);
  color: var(--darkText);
  padding: clamp(80px, 10vh, 140px) var(--padX);
  position: relative;
  overflow: hidden;
}

.about__wrap{
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* Center ONLY the second line ("ME") */
.about__bg span:nth-child(2){
  text-align: center;
}

.about__bg{
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 650ms ease, transform 650ms ease;

  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
}

.about__bg.is-visible{
  transform: translateY(0);
  opacity: 1;
}

.about__bg span{
  display: block;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-transform: uppercase;
  font-size: clamp(84px, 11vw, 210px);
  color: rgba(255,255,255,0.06);
}

.about__grid{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(22px, 6vw, 80px);
  align-items: start;
  padding-top: clamp(140px, 16vw, 260px);
}

.about__label{
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--darkMuted);
}

.about__content{ max-width: 980px; }

.about__headline{
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(28px, 3.2vw, 54px);
}

.about__columns{
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
}

.about__columns p{
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--darkMuted);
}

.about__meta{
  margin-top: clamp(60px, 8vh, 100px);
  border-top: 1px solid var(--darkLine);
}

.about__row{
  display: grid;
  grid-template-columns: 200px 1fr;
  padding: 20px 0;
  border-bottom: 1px solid var(--darkLine);
  gap: 18px;
}

.about__key{
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.about__value{
  color: var(--darkText);
  font-size: 14px;
}

/* ---------- SERVICES (NEW) ---------- */
.services{
  padding: clamp(80px, 10vh, 130px) var(--padX);
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.services__wrap{
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.services__bg{
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
}

.services__bg span{
  display: block;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-transform: uppercase;
  font-size: clamp(84px, 11vw, 220px);
  color: rgba(0,0,0,0.06);
  margin-top: -15px;
}

@media (min-width: 901px){
  .services__bg span:nth-child(2){
    text-align: center;
  }
}

.services__head{
  position: relative;
  z-index: 2;
  padding-top: clamp(140px, 16vw, 260px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Head row gives us right alignment */
.services__headRow{
  display: flex;
  justify-content: flex-end;
}

/* ✅ KEEP the creative sub “caption card” (removed the overriding boring one) */
.services__sub{
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
  max-width: 560px;

  position: relative;
  padding: 14px 16px 14px 16px;
  border-radius: 16px;

  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 18px 45px rgba(0,0,0,0.06);

  text-align: left;
  backdrop-filter: blur(6px);
}

/* little tag top-left */
.services__subTag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
  padding: 6px 10px;
  border-radius: 999px;

  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: rgba(0,0,0,0.60);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
}

/* tiny “signal dots” / pulse on the right */
.services__subPulse{
  position: absolute;
  right: 14px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  box-shadow:
    -16px 0 0 rgba(0,0,0,0.22),
    -32px 0 0 rgba(0,0,0,0.12);
  animation: servicesPulse 1.4s ease-in-out infinite;
}

@keyframes servicesPulse{
  0%, 100%{ transform: scale(1); opacity: 0.65; }
  50%{ transform: scale(1.35); opacity: 1; }
}

/* subtle underline accent */
.services__sub::after{
  content:"";
  position: absolute;
  left: 16px;
  bottom: 12px;
  width: 70px;
  height: 2px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
}

/* Mobile: don’t force right alignment */
@media (max-width: 900px){
  .services__headRow{ justify-content: flex-start; }
  .services__sub{ max-width: 100%; font-size: 15px; }
}

.services__grid{
  position: relative;
  z-index: 2;
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.service-card{
  grid-column: span 4;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--bg-secondary);
  box-shadow: 0 18px 45px rgba(0,0,0,0.05);
  padding: 18px 18px 16px;

  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.service-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0,0,0,0.08);
}

.service-card__top{
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.service-card__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.04);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: rgba(0,0,0,0.75);
}

.service-card__title{
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.service-card__text{
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(0,0,0,0.62);
  max-width: 56ch;
}

.service-card__list{
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.service-card__list li{
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.60);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 10px;
}

@media (max-width: 900px){
  .services__bg{
    position: relative;
    margin-bottom: 18px;
    z-index: 2;
  }

  .services__bg span{
    font-size: clamp(54px, 14vw, 110px);
    line-height: 0.85;
    color: rgba(0,0,0,0.15);
    text-align: left;
    margin-bottom: 15px;
  }

  .services__head{ padding-top: 0; }

  .services__grid{
    grid-template-columns: 1fr;
  }

  .service-card{
    grid-column: span 12;
  }
}

/* ---------- PROJECTS ---------- */
.projects{
  padding: clamp(80px, 10vh, 130px) var(--padX);
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.projects__wrap{
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.projects__bg{
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
}

.projects__bg span{
  display: block;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-transform: uppercase;
  font-size: clamp(84px, 11vw, 220px);
  color: rgba(0,0,0,0.06);
  margin-top: -15px;
}

@media (min-width: 901px){
  .projects__bg span:nth-child(2){
    text-align: center;
  }
}

.projects__head{
  position: relative;
  z-index: 2;
  padding-top: clamp(140px, 16vw, 260px);
  max-width: 980px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border-subtle);
}

.projects__sub{
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
  max-width: 520px;
}

.projects__grid{
  position: relative;
  z-index: 2;
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.project-card{
  grid-column: span 6;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 18px 45px rgba(0,0,0,0.05);
}

.project-card__media{
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  cursor: pointer;
  position: relative;
  background: var(--bg-secondary);
  isolation: isolate;
}

.project-card__media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-blend-tint);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.project-card__media img{
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  transform: scale(1);
  filter: var(--card-image-filter);
  transition: transform 200ms ease, filter 200ms ease;
}

.project-card__media:hover img{ transform: scale(1.02); }

.project-card__hint{
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.10);
  padding: 8px 10px;
  border-radius: 999px;
}

.project-card__body{ padding: 18px 18px 16px; }

.project-card__top{
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
}

.project-card__num{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  padding-top: 4px;
}

.project-card__title{
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.project-card__meta{
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
}

.project-card__actions{
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.project-card__btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.10);
  text-decoration: none;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease;
}

.project-card__btn:hover{
  transform: translateY(-1px);
  background: rgba(0,0,0,0.085);
}

@media (max-width: 900px){
  .projects__bg{
    position: relative;
    margin-bottom: 18px;
    z-index: 2;
  }

  .projects__bg span{
    font-size: clamp(54px, 14vw, 110px);
    line-height: 0.85;
    color: rgba(0,0,0,0.15);
    text-align: left;
    margin-bottom: 15px;
  }

  .projects__head{ padding-top: 0; }

  .projects__grid{ grid-template-columns: 1fr; }
  .project-card{ grid-column: span 12; }

  .project-card{
    background: var(--bg-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.035);
  }

  .project-card__media::after{
    background: rgba(245,245,247,0.42);
  }

  .project-card__media img{
    height: 210px;
    filter: saturate(0.76) contrast(1.01);
  }
}

/* ---------- MODAL ---------- */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}
.modal.is-open{ display: block; }

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.modal__panel{
  position: relative;
  width: min(1100px, 94vw);
  max-height: 90vh;
  margin: 4vh auto 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.35);
  overflow: hidden;
}

.modal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.95);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  z-index: 5;
}

.modal__stage{
  position: relative;
  background: #111;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal__img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
}

.modal__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.35);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  display: grid;
  place-items: center;
}
.modal__nav--prev{ left: 12px; }
.modal__nav--next{ right: 12px; }

.modal__footer{
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal__caption{
  margin: 0;
  font-size: 12px;
  color: rgba(0,0,0,0.6);
}

.modal__dots{
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.modal__dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.25);
  background: transparent;
  cursor: pointer;
}

.modal__dot.is-active{ background: rgba(0,0,0,0.7); }

/* ---------- TECH STACK ---------- */
.stack{
  background: var(--bg-primary);
  padding: clamp(70px, 9vh, 110px) var(--padX);
}

.stack__wrap{
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.stack__label{
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  font-weight: 900;
}

.stack__title{
  margin: 14px 0 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.stack__list{
  margin: 26px auto 0;
  padding: 0;
  list-style: none;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;

  max-width: 900px;
}

.stack__item{
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- CONTACT ---------- */
.contact{
  background: #0c0c0e;
  color: #f2f2f2;
  padding: clamp(80px, 10vh, 140px) clamp(20px, 6vw, 80px);
}

.contact__wrapper{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  max-width: 1200px;
  margin: 0 auto;
}

.contact__label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
}

.contact__headline{
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.contact__headline span{ color: rgba(255,255,255,0.5); }

.contact__text{
  max-width: 420px;
  font-size: 15px;
  font-family: "Reddit Mono";
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
}

.contact__info{
  margin-top: 40px;
  display: grid;
  gap: 24px;
  font-family: "Reddit Mono";
}

.contact__info-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
  font-family: "Reddit Mono";
}

.contact__info a,
.contact__info span{
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.contact__info a:hover{ opacity: 0.7; }

.contact__form{
  display: grid;
  gap: 24px;
}

.contact__field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__field label{
  font-size: 12px;
  font-family: "Reddit Mono";
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.contact__field input,
.contact__field textarea{
  background: #141416;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border 200ms ease, background 200ms ease;
}

.contact__field input:focus,
.contact__field textarea:focus{
  border-color: rgba(255,255,255,0.4);
  background: #18181b;
}

.contact__btn{
  margin-top: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.contact__btn:hover{
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* ---------- FOOTER ---------- */
.footer{
  background: #0c0c0e;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 26px clamp(20px, 6vw, 80px);
}

.footer__inner{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer__left{ font-family: "Reddit Mono"; justify-self: start; }

.footer__email{
  font-family: "Reddit Mono";
  text-decoration: none;
  color: #f4f0f0;
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: opacity 200ms ease;
}

.footer__email:hover{ opacity: 0.6; }

.footer__socials{
  display: flex;
  gap: 22px;
  justify-content: center;
}

.footer__socials a{
  color: #fef8f8;
  font-size: 26px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.footer__socials a:hover{
  transform: translateY(-2px);
  opacity: 0.6;
}

.footer__right{
  font-family: "Reddit Mono";
  justify-self: end;
  font-size: 16px;
  color: rgba(249, 245, 245, 0.932);
}

/* ✅ FIX: footer sometimes stays invisible in some emulated tablet sizes because reveal starts at opacity:0.
   Keep reveal everywhere else, but ensure footer always shows. */
.footer.reveal{
  opacity: 1;
  transform: none;
}

/* ---------- Reveal ---------- */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .reveal{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- MOBILE FIXES ---------- */
@media (max-width: 900px){
  .topbar{
    min-height: auto;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 2000;
  }

  .nav{ position: static; }

  .nav__drawer{
    position: fixed;
    right: var(--padX);
    top: 84px;
  }

  .nav__toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .nav__inner--desktop{ display: none; }

  .topbar__right{
    width: 100%;
    justify-content: flex-start;
    margin-top: 6px;
    font-size: 12px;
  }

  .hero{
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
    overflow: hidden;
    padding-bottom: 26px;
  }

  .hero__bgword span{
    left: 6vw;
    top: 21%;
    transform: none;
    font-size: clamp(120px, 22vw, 240px);
    opacity: 0.10;
  }

  .hero__media{
    order: 2;
    margin: 28px 0 0;
    background: transparent;
    padding: 0;
  }

  .hero__media img{
    width: min(420px, 92vw);
    height: auto;
    max-height: 520px;
    filter: grayscale(1) contrast(0.9) brightness(0.96) !important;
    opacity: 0.80 !important;
  }

  .hero__title{ transform: none; }

  .about__grid{ grid-template-columns: 1fr; }
  .about__columns{ grid-template-columns: 1fr; }
  .about__row{ grid-template-columns: 1fr; gap: 10px; }

  .contact__wrapper{ grid-template-columns: 1fr; }
  .contact__headline{ font-size: clamp(32px, 8vw, 52px); }

  .footer__inner{
    background: #0c0c0e;
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .footer__left,
  .footer__right{ justify-self: center; }
}

@media (max-width: 768px){
  .hero__media img{
    filter: grayscale(1) contrast(1.9) brightness(0.96) !important;
    opacity: 0.80 !important;
  }
}

/* ---------- LOADER (CSS only) ---------- */
.loader{
  position: fixed;
  inset: 0;
  background: #0c0c0e;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  transform: translateY(0);
}

.loader__inner{
  width: min(980px, 92vw);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.loader__code{
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Reddit Mono", monospace;
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.75;
  color: rgba(84, 238, 13, 0.88);
}

.loader__hud{
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(84, 238, 13, 0.75);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loader__cursor{
  display: inline-block;
  width: 10px;
  height: 1.1em;
  margin-left: 4px;
  background: rgba(255,255,255,0.92);
  border-radius: 2px;
  transform: translateY(2px);
  animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink{
  50% { opacity: 0; }
}

.loader.is-exit{
  animation: curtainUp 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes curtainUp{
  to{ transform: translateY(-105%); }
}

body.is-loading{
  overflow: hidden;
}

/* ABOUT mobile ghost behavior */
@media (max-width: 900px){
  .about__wrap{ max-width: 100%; }

  .about__bg{
    position: relative;
    margin-bottom: 18px;
    z-index: 2;
  }

  .about__bg span{
    font-size: clamp(54px, 14vw, 110px);
    text-align: left;
    line-height: 0.85;
    color: rgba(255,255,255,0.10);
  }

  .about__grid{ padding-top: 0; }
}

@media (min-width: 901px){
  .about__bg span:nth-child(2){
    text-align: center;
  }
}

/* --- FIX: remove the mobile “white seam” above the footer --- */
@media (max-width: 900px){
  .footer{
    border-top: 0 !important;
    margin-top: 0 !important;
    background: #0c0c0e;
  }

  /* prevents a 1px gap between sections on some mobile browsers */
  .contact{
    margin-bottom: 0 !important;
    padding-bottom: clamp(80px, 10vh, 140px) !important;
  }
}

/* extra safety if the seam is coming from section edges */
.footer,
.contact{
  background-clip: padding-box;
  background: #0c0c0e;
}