/* ─────────────────────────────────────────────────────────────────
   alecsquire.co.uk — Portfolio stylesheet
   Design: editorial, minimal, light — "design-first agency" register
   Font: Satoshi (Fontshare)
   ───────────────────────────────────────────────────────────────── */

/* ─── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #F8F5F0;
  --bg-ruled:   #FFFFFF;
  --text:       #141414;
  --muted:      #6B6560;
  --border:     #E2DDD7;
  --nav-height: 60px;

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Satoshi', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Layout ────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* ─── Scroll reveal ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }

/* ─── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background-color: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav.is-scrolled {
  background-color: rgba(248, 245, 240, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 0 24px;
  }
}

.nav-brand {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .nav-links {
    gap: 20px;
  }
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-height) + 100px);
  padding-bottom: 100px;
}

.hero-meta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.hero-name {
  font-size: clamp(4.5rem, 11vw, 9.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin-bottom: 40px;
  color: var(--text);
}

.hero-tagline {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.hero-links a:hover {
  text-decoration-color: var(--text);
}

.hero-links span {
  color: var(--border);
  font-size: 1.1em;
}

/* ─── Skills strip (marquee) ────────────────────────────────────── */
.skills-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  overflow: hidden;
  position: relative;
}

.skills-strip-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 40s linear infinite;
}

.skills-strip-track span {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 12px;
}

.skills-strip-track .dot {
  color: var(--border);
  padding: 0;
  font-size: 0.6rem;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .skills-strip-track { animation: none; }
}

/* ─── Section commons ───────────────────────────────────────────── */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section--ruled {
  background-color: var(--bg-ruled);
}

.section-label {
  margin-bottom: 64px;
}

.section-label span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-label {
    margin-bottom: 48px;
  }
}

/* ─── Projects ──────────────────────────────────────────────────── */

/* Featured (full-width, horizontal on desktop) */
.project--featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (min-width: 900px) {
  .project--featured {
    grid-template-columns: 3fr 2fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 40px;
  }
}

/* Second featured project — image on right */
@media (min-width: 900px) {
  .project--reverse .project-image {
    order: 2;
  }
  .project--reverse .project-body {
    order: 1;
  }
}

/* Image area */
.project-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background-color: var(--border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.project:hover .project-image img,
.project--featured:hover .project-image img {
  transform: scale(1.02);
}

/* Placeholder — remove once real screenshots are in */
.project-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #EAE6DF 0%, #DDD9D1 100%);
}

/* Body */
.project-body {
  padding-top: 4px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}

.project-name {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.project-desc {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.project-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.project-link:hover {
  text-decoration-color: var(--text);
}

/* ─── HighCohesion ──────────────────────────────────────────────── */
.hc-content {
  max-width: 680px;
}

.hc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.hc-role {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hc-content p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.7;
}

/* ─── About ─────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 200px 1fr;
    gap: 80px;
  }
}

.about-label {
  padding-top: 4px;
}

.about-label span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-content > p {
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.7;
  max-width: 620px;
}

.skills {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.skills-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.skills-list {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.8;
}

/* ─── Contact ───────────────────────────────────────────────────── */
.contact-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}

.contact {
  flex: 1;
}

.contact-photo-wrap {
  flex-shrink: 0;
}

.contact-photo {
  width: 240px;
  height: 240px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .contact-grid {
    flex-direction: column;
    gap: 40px;
  }
  .contact-photo {
    width: 160px;
    height: 160px;
  }
}

.contact-heading {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-links a {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.contact-links a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
}

.footer span {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-left span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ─── Accessibility ─────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}
