/* Hussnain Arshad — Editorial portfolio */

:root {
  --ink: #0c1214;
  --ink-soft: #2a3538;
  --muted: #5c6b70;
  --line: rgba(12, 18, 20, 0.12);
  --paper: #eef2f4;
  --paper-deep: #dfe7eb;
  --mist: #f6f8f9;
  --accent: #0d5c56;
  --accent-hover: #094743;
  --accent-soft: rgba(13, 92, 86, 0.12);

  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: clamp(5rem, 12vw, 9rem);

  --pad-x: clamp(1.1rem, 4vw, 3.5rem);
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

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

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.55;
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--accent);
  color: #f4faf9;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Atmosphere */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, #c5d8de 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 95% 8%, #b8d0c8 0%, transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 100%, #d4dde3 0%, transparent 55%),
    linear-gradient(165deg, #e8eef1 0%, #f4f6f7 45%, #e3eaee 100%);
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: calc(0.35rem + var(--safe-top)) var(--pad-x) 0.35rem;
  backdrop-filter: blur(12px);
  background: rgba(246, 248, 249, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(246, 248, 249, 0.9);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(0.35rem, 1.5vw, 1.75rem);
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a.is-active {
  color: var(--accent);
}

.nav a.is-active {
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1.5px;
}

/* Hero */

.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 6vh, 4rem) var(--pad-x) clamp(2.5rem, 6vh, 4.5rem);
  max-width: calc(var(--max) + 8rem);
  margin: 0 auto;
}

.hero__role {
  margin: 0 0 var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.status {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(13, 92, 86, 0.45);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 92, 86, 0.4);
  }
  70% {
    box-shadow: 0 0 0 0.55rem rgba(13, 92, 86, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 92, 86, 0);
  }
}

.hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.6rem, 10vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero__headline {
  margin: var(--space-md) 0 var(--space-sm);
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink-soft);
}

.hero__support {
  margin: 0 0 var(--space-md);
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(52vh, 28rem);
  align-self: center;
}

.hero__mark {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 1;
  will-change: transform;
}

.hero__mark::before {
  content: "";
  position: absolute;
  inset: 8% 4% 4%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 45% 40%,
    rgba(13, 92, 86, 0.18),
    transparent 68%
  );
  filter: blur(8px);
  z-index: 0;
}

.hero__avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 22px 48px rgba(12, 18, 20, 0.14));
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    align-items: start;
    padding: 1.25rem var(--pad-x) 2rem;
    gap: 1.25rem;
  }

  .hero__visual {
    order: -1;
    min-height: 0;
    width: min(42vw, 11.5rem);
    justify-self: start;
  }

  .hero__mark {
    width: 100%;
  }

  .hero__brand {
    font-size: clamp(2.75rem, 13vw, 4.5rem);
  }

  .hero__headline {
    max-width: none;
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .hero__support {
    max-width: none;
    font-size: 1rem;
  }

  .hero__ctas {
    width: 100%;
  }

  .hero__ctas .btn {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 8.5rem;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

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

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

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Marquee-style statement band */

.statement {
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--pad-x);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.statement__line {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .statement__line {
    white-space: normal;
    max-width: 12ch;
  }
}

.statement__line span {
  color: var(--accent);
  margin: 0 0.15em;
}

/* Sections */

.section {
  padding: var(--space-2xl) var(--pad-x);
  max-width: calc(var(--max) + 8rem);
  margin: 0 auto;
}

.section__intro {
  max-width: 40rem;
  margin-bottom: var(--space-xl);
}

.eyebrow {
  margin: 0 0 var(--space-xs);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
}

/* Work cases — editorial, not cards */

.case {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr;
  gap: var(--space-md) var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: background 0.35s var(--ease);
}

.case::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

.case:hover::before,
.case:focus-within::before {
  transform: scaleY(1);
}

.case:hover {
  background: rgba(255, 255, 255, 0.35);
}

.case:last-child {
  border-bottom: 1px solid var(--line);
}

.case__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.35rem;
  grid-row: 1 / -1;
}

.case__index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.case__org {
  font-size: 0.9rem;
  color: var(--muted);
}

.case__title {
  grid-column: 2;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.case__body {
  grid-column: 2;
  margin: 0;
  max-width: 52ch;
  color: var(--ink-soft);
}

.case__metrics {
  grid-column: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.75rem;
  color: var(--ink);
  font-size: 0.98rem;
}

.case__metrics strong {
  color: var(--accent);
  font-weight: 700;
}

.case__link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

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

@media (max-width: 700px) {
  .case {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-md) 0 var(--space-md) 0.85rem;
  }

  .case__meta {
    flex-direction: row;
    align-items: baseline;
    gap: 0.75rem;
    grid-row: auto;
  }

  .case__title,
  .case__body,
  .case__metrics {
    grid-column: 1;
  }

  .case__body {
    max-width: none;
  }

  .case__metrics {
    flex-direction: column;
    gap: 0.45rem;
  }

  .case__link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

/* Experience */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr;
  gap: var(--space-md) var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
}

.timeline__item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline__when {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  padding-top: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline__what h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
}

.timeline__org {
  margin: 0 0 var(--space-sm);
  color: var(--accent);
  font-weight: 600;
}

.timeline__what p:last-child {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-soft);
}

@media (max-width: 700px) {
  .timeline__item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
  }

  .timeline__what p:last-child {
    max-width: none;
  }
}

/* Credentials */

.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg) var(--space-xl);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
}

.cred h3 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.cred p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  max-width: 36ch;
}

.cred p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .cred-grid {
    grid-template-columns: 1fr;
  }
}

.cred-strip {
  margin: var(--space-xl) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 48rem;
  line-height: 1.6;
}

.cred-strip a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* Contact */

.contact {
  padding-bottom: calc(var(--space-2xl) + 1rem);
}

.contact__inner {
  max-width: 44rem;
}

.contact h2 {
  max-width: 14ch;
}

.contact .lede {
  margin-bottom: var(--space-md);
}

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

@media (max-width: 640px) {
  .contact h2 {
    max-width: none;
  }

  .contact__links {
    flex-direction: column;
  }

  .contact__links .btn {
    width: 100%;
  }
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: var(--space-md) var(--pad-x) calc(var(--space-lg) + var(--safe-bottom));
  max-width: calc(var(--max) + 8rem);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Motion */

.reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
}

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

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero stays readable even if animations are paused; scroll reveals still fade. */
.hero [data-reveal] {
  opacity: 1;
  transform: none;
  animation: hero-enter 0.9s var(--ease) both;
}

.hero__copy .reveal:nth-child(1) {
  animation-delay: 0.05s;
}
.hero__copy .reveal:nth-child(2) {
  animation-delay: 0.14s;
}
.hero__copy .reveal:nth-child(3) {
  animation-delay: 0.22s;
}
.hero__copy .reveal:nth-child(4) {
  animation-delay: 0.3s;
}
.hero__copy .reveal:nth-child(5) {
  animation-delay: 0.38s;
}
.hero__visual.reveal {
  animation-delay: 0.18s;
}

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

  .reveal,
  .hero [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .status {
    animation: none;
  }

  .hero__mark {
    will-change: auto;
  }
}

/* Compact phones */
@media (max-width: 480px) {
  :root {
    --space-2xl: clamp(3.25rem, 14vw, 5rem);
    --space-xl: 3rem;
    --space-lg: 2rem;
    --header-h: 3.5rem;
  }

  .nav {
    gap: 0.15rem 0.65rem;
  }

  .nav a {
    font-size: 0.88rem;
    padding: 0.45rem 0.1rem;
  }

  .hero__role {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
  }

  .section__intro {
    margin-bottom: var(--space-lg);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (hover: none) {
  .case:hover {
    background: transparent;
  }

  .btn--primary:hover,
  .btn--ghost:hover {
    transform: none;
  }
}
