/* ============================================
   michaelrspeciale.com — style.css v3
   Sharp. Confident. Unmistakable.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&display=swap');

:root {
  --ink:          #0a0a0a;
  --ink-mid:      #333333;
  --ink-light:    #5a5a5a;
  --ink-faint:    #8a8a8a;
  --surface:      #f3f0eb;
  --surface-alt:  #e5e1da;
  --white:        #ffffff;
  --dark:         #0a0a0a;
  --dark-surface: #141414;
  --dark-text:    #f3f0eb;
  --dark-muted:   #777777;
  --accent:       #c86747;
  --accent-hover: #e07a5a;
  --accent-subtle:rgba(200, 103, 71, 0.08);

  --text-xs:      clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);
  --text-sm:      clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base:    clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --text-lg:      clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-xl:      clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --text-2xl:     clamp(1.75rem, 1.3rem + 2vw, 3rem);
  --text-3xl:     clamp(2.5rem, 1.5rem + 4.5vw, 5.5rem);
  --text-display: clamp(3.5rem, 1.5rem + 8vw, 10rem);

  --space-2xs:  0.25rem;
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;
  --space-2xl:  10rem;
  --space-3xl:  14rem;

  --max-width:  1200px;
  --narrow:     680px;
  --gutter:     clamp(1.5rem, 5vw, 4rem);

  --ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:   cubic-bezier(0, 0, 0.2, 1);
  --duration:   0.5s;
}


/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle grain texture over entire page */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

::selection { background: var(--accent); color: var(--white); }
img { max-width: 100%; height: auto; display: block; }


/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--ink);
}

p { max-width: 56ch; margin-bottom: var(--space-sm); }

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: all 0.3s var(--ease);
}
a:hover { color: var(--accent); }

.label {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Label with line extending to the right */
.label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-alt);
}

.dark-section .label::after {
  background: rgba(255,255,255,0.1);
}


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

section { padding: var(--space-xl) 0; }


/* ========================
   HEADER
   ======================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  transition: all 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(243, 240, 235, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-alt);
}

.site-name {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-name:hover { color: var(--ink); text-decoration: none; }

.site-nav { display: flex; gap: var(--space-md); list-style: none; }

.site-nav a {
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.site-nav a:hover::after { width: 100%; }


/* ========================
   HERO — Big, bold, typographic
   ======================== */
.section-hero {
  padding-top: 12vh;
  padding-bottom: var(--space-lg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.hero-name-block {
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.hero-display-name {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.hero-display-name .line {
  display: block;
}

.hero-display-name .accent-char {
  color: var(--accent);
}

/* Thin accent bar under the name */
.hero-rule {
  width: 100%;
  height: 3px;
  background: var(--ink);
  margin: var(--space-md) 0 var(--space-lg);
  position: relative;
}

.hero-rule::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 120px;
  height: 100%;
  background: var(--accent);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-lg);
  align-items: end;
}

.hero-description {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--ink-mid);
  max-width: 44ch;
  margin-bottom: 0;
}

.hero-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.hero-links a {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all 0.3s var(--ease);
}

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

.hero-links a .dash {
  width: 16px;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
  order: -1;
}

.hero-links a:hover .dash { width: 28px; }


/* ========================
   PORTRAIT — editorial, cropped
   ======================== */
.portrait-section {
  padding: var(--space-md) 0 var(--space-xl);
}

.portrait-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.portrait-image {
  overflow: hidden;
  position: relative;
}

.portrait-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  aspect-ratio: 4/5;
  filter: contrast(1.05);
  transition: transform 6s var(--ease);
}

.portrait-image:hover img {
  transform: scale(1.03);
}

.portrait-info {
  background: var(--ink);
  color: var(--dark-text);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
}

.portrait-info .label {
  color: var(--dark-muted);
  margin-bottom: var(--space-md);
}

.portrait-info .label::after {
  background: rgba(255,255,255,0.1);
}

.portrait-tagline {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--dark-text);
  margin-bottom: var(--space-md);
}

.portrait-bio {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--dark-muted);
  max-width: 40ch;
}


/* ========================
   ABOUT
   ======================== */
#about {
  padding: var(--space-xl) 0;
}

.about-content {
  margin-top: var(--space-lg);
}

.bio-text {
  font-size: var(--text-lg);
  line-height: 1.8;
  max-width: 52ch;
}
.bio-text p + p { margin-top: var(--space-sm); }

.experience-list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.experience-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--surface-alt);
  font-size: var(--text-sm);
}

.experience-item:first-child {
  border-top: 1px solid var(--surface-alt);
}

.experience-year {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  padding-top: 2px;
}

.experience-role {
  color: var(--ink-mid);
}

.experience-role strong {
  color: var(--ink);
  font-weight: 600;
}

.experience-role a {
  font-weight: 600;
}


/* ========================
   WORK — Selected Projects
   ======================== */
.work-grid {
  display: grid;
  gap: 0;
  margin-top: var(--space-lg);
}

.work-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--surface-alt);
  align-items: baseline;
  transition: all 0.4s var(--ease);
  position: relative;
}

.work-item:first-child { border-top: 1px solid var(--surface-alt); }

.work-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--gutter));
  right: calc(-1 * var(--gutter));
  top: 0; bottom: 0;
  background: var(--accent-subtle);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: -1;
}

.work-item:hover::before { opacity: 1; }

.work-meta { display: flex; flex-direction: column; gap: 2px; }

.work-year {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.work-type { font-size: var(--text-xs); color: var(--ink-faint); }

.work-content { display: flex; flex-direction: column; gap: 4px; }

.work-title {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}
.work-title a { text-decoration: none; }
.work-item:hover .work-title,
.work-title a:hover { color: var(--accent); }

.work-description {
  color: var(--ink-light);
  font-size: var(--text-sm);
  max-width: 52ch;
  margin-bottom: 0;
  line-height: 1.6;
}


/* ========================
   ATMOSPHERIC IMAGE BREAK
   ======================== */
.image-break {
  width: 100%;
  overflow: hidden;
  max-height: 60vh;
  position: relative;
}

.image-break img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: center 15%;
  filter: contrast(1.1) brightness(0.95);
}

/* Gradient overlay for smooth transition into dark contact */
.image-break::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--dark));
  pointer-events: none;
}


/* ========================
   CONTACT (dark section)
   ======================== */
.dark-section {
  background: var(--dark);
  color: var(--dark-text);
  padding: var(--space-xl) 0;
}

.dark-section h2, .dark-section h3 { color: var(--dark-text); }
.dark-section p { color: var(--dark-muted); }
.dark-section .label { color: var(--dark-muted); }
.dark-section a { color: var(--dark-text); text-decoration-color: var(--accent); }
.dark-section a:hover { color: var(--accent-hover); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  align-items: start;
}

.contact-heading {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
  color: var(--dark-text);
}

.contact-subtext {
  font-size: var(--text-base);
  color: var(--dark-muted);
  max-width: 38ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-link {
  font-size: var(--text-lg);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s var(--ease);
}

.contact-link:hover {
  padding-left: var(--space-sm);
  border-bottom-color: var(--accent);
}

.contact-link .arrow {
  font-size: 1.2em;
  transition: transform 0.3s var(--ease);
  color: var(--dark-muted);
}

.contact-link:hover .arrow {
  transform: translateX(6px);
  color: var(--accent);
}

.contact-location {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: var(--text-sm);
  color: var(--dark-muted);
}


/* ========================
   FOOTER
   ======================== */
.site-footer {
  padding: var(--space-md) 0;
  background: var(--dark);
  color: var(--dark-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}


/* ========================
   REVEAL ANIMATIONS
   ======================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.18s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.30s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.36s; }

.reveal-hero {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal-hero.is-visible { opacity: 1; transform: translateY(0); }

.reveal-hero-delay {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out) 0.3s, transform 0.8s var(--ease-out) 0.3s;
}
.reveal-hero-delay.is-visible { opacity: 1; transform: translateY(0); }

.reveal-hero-delay-2 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.5s, transform 0.8s var(--ease-out) 0.5s;
}
.reveal-hero-delay-2.is-visible { opacity: 1; transform: translateY(0); }


/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .hero-links {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .hero-display-name {
    font-size: clamp(2.5rem, 1rem + 7vw, 5rem);
  }

  .portrait-container {
    grid-template-columns: 1fr;
  }

  .portrait-info {
    padding: var(--space-md);
  }

  .work-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .work-meta {
    flex-direction: row;
    gap: var(--space-sm);
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: var(--space-2xs);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .site-nav { gap: var(--space-sm); }

  .footer-content { flex-direction: column; gap: var(--space-xs); }

  .image-break img { height: 40vh; }
}

@media (max-width: 480px) {
  .site-nav { gap: var(--space-xs); }
  .hero-display-name { font-size: clamp(2rem, 0.8rem + 6vw, 3.5rem); }
}

@media print {
  body::after { display: none; }
  .site-header, .site-footer, .dark-section, .image-break, .portrait-section { display: none; }
  body { background: white; color: black; font-size: 11pt; }
}
