/*
Theme Name: Jake Binstein 2026
Theme URI: https://jakebinstein.com
Description: Minimal personal site.
Version: 2.0
Author: Jake Binstein
*/

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --white:   #FFFFFF;
  --black:   #0D0D0D;
  --dark:    #333333;
  --accent:  #5cacd1;
  --muted:   #737373;
  --rule:    #E5E5E5;
  --surface: #F7F7F5;

  --font-display:  'DM Serif Display', Georgia, serif;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-headings: 'Oswald', Arial, serif;

  --max-w:  1100px;
  --pad:    clamp(1.25rem, 5vw, 2rem);
  --ease:   0.3s ease;

  --nav-h:  60px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   NAV
   ============================================================ */
.site-header {
  min-height: var(--nav-h);
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  background: #333333;
}
.header-inner {
  font-family: var(--font-headings);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.wordmark {
  font-size: 2rem;
  font-weight: normal;
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  line-height: 1;
}
.wordmark-subtitle {
  font-size: 1rem;
  font-weight: normal;
  color: #ffffff;
  letter-spacing: 0.06em;
}
.primary-nav {
  margin-left: auto;
}
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.primary-nav a {
  font-size: 1.5rem;
  color: rgb(255,255,255);
  transition: color var(--ease);
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--accent);
}
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  margin-left: auto;
  color: #ffffff;
}
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: var(--white);
  z-index: 99;
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--rule);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 1.75rem; }
.mobile-nav a { font-size: 1.5rem; font-weight: 600; color: var(--black); display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}
.hero-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.hero-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: #bbb;
  font-size: 0.8125rem;
}
.hero-photo-placeholder svg { opacity: 0.3; }
.hero-text { padding-top: 0.25rem; }
.hero-name {
  font-family: var(--font-headings);
  font-size: clamp(2.5rem, 8.33vw, 6.25rem);
  font-weight: normal;
  letter-spacing: 0.01em;
  line-height: 0.95;
  color: var(--accent);
}
.hero-greeting {
  display: block;
  font-family: var(--font-headings);
  font-size: clamp(2.5rem, 8.33vw, 6.25rem);
  font-weight: normal;
  color: #333333;
  letter-spacing: 0.01em;
  margin-bottom: 0.1em;
}
.hero-subtitle {
  font-family: var(--font-headings);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: normal;
  color: #333333;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
  margin-bottom: 1.75rem;
}
.hero-role {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-role span + span::before {
  content: '·';
  margin-right: 1rem;
}
.hero-bio {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #333;
  max-width: 52ch;
  margin-bottom: 2.25rem;
}
.hero-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.hero-link {
  font-size: 0.875rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color var(--ease), text-decoration-color var(--ease);
}
.hero-link:hover {
  color: var(--black);
  text-decoration-color: var(--black);
}
.hero-link svg { flex-shrink: 0; }

/* ============================================================
   SECTION — shared
   ============================================================ */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--rule);
}
.section-last {
  border-bottom: none;
}
.section-heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}


/* ============================================================
   WORK LIST — homepage
   ============================================================ */
.work-list { display: flex; flex-direction: column; }
.work-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: var(--black);
  transition: color var(--ease);
}
.work-item:last-child { border-bottom: 1px solid var(--rule); }
.work-item:hover { color: var(--muted); }
.work-item-title {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.work-item-arrow {
  font-size: 1rem;
  color: var(--rule);
  transition: color var(--ease), transform var(--ease);
  flex-shrink: 0;
}
.work-item:hover .work-item-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}
.work-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color var(--ease), text-decoration-color var(--ease);
}
.work-more:hover { color: var(--black); text-decoration-color: var(--black); }

/* ============================================================
   SERVICES — hero bullet list
   ============================================================ */
.hero-services {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 2.5rem;
  margin-bottom: 2.25rem;
  max-width: 52ch;
}
.hero-services li {
  font-size: 0.9375rem;
  color: var(--black);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.hero-services li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   WRITING LIST — homepage & blog page
   ============================================================ */
.writing-list { display: flex; flex-direction: column; }
.writing-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}
.writing-item:last-child { border-bottom: 1px solid var(--rule); }
.writing-date {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color var(--ease);
}
.writing-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color var(--ease);
}
.writing-item:hover .writing-title { color: var(--accent); }
.writing-item:hover .writing-date  { color: var(--accent); }
.writing-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.25rem;
}
.writing-arrow {
  font-size: 1rem;
  color: var(--rule);
  flex-shrink: 0;
  transition: color var(--ease), transform var(--ease);
}
.writing-item:hover .writing-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ============================================================
   PRESS LIST — homepage & news page
   ============================================================ */
.press-list { display: flex; flex-direction: column; }
.press-item {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}
.press-item:last-child { border-bottom: 1px solid var(--rule); }
.press-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.press-source {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--black);
  overflow-wrap: break-word;
  transition: color var(--ease);
}
.press-date {
  font-size: 0.75rem;
  color: var(--muted);
  transition: color var(--ease);
}
.press-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color var(--ease);
}
.press-item:hover .press-title  { color: var(--accent); }
.press-item:hover .press-source { color: var(--accent); }
.press-item:hover .press-date   { color: var(--accent); }
.press-arrow {
  font-size: 1rem;
  color: var(--rule);
  flex-shrink: 0;
  transition: color var(--ease), transform var(--ease);
}
.press-item:hover .press-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ============================================================
   PROJECTS PAGE
   ============================================================ */
.page-header {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-header p,
.page-intro p {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.75rem;
  max-width: 54ch;
}

.projects-list { display: flex; flex-direction: column; }
.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.project-row:first-child { border-top: 1px solid var(--rule); }
.project-image {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  overflow: hidden;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-row:hover .project-image img { transform: scale(1.02); }
.project-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
}
.project-image.no-image svg { opacity: 0.2; }
.project-content { padding-top: 0.25rem; }
.project-title {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.project-title a { transition: color var(--ease); }
.project-title a:hover { color: var(--muted); }
.project-excerpt {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.project-link {
  font-size: 0.875rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color var(--ease), text-decoration-color var(--ease);
}
.project-link:hover { color: var(--black); text-decoration-color: var(--black); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page { padding: clamp(3rem, 6vw, 5rem) 0; }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
}
.contact-info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.contact-info p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
.contact-email:hover { color: var(--muted); }

/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--black);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  font-size: 0.9375rem;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color var(--ease);
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #bbb; }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-submit {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.8125rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  font-family: var(--font-sans);
}
.form-submit:hover { background: var(--white); color: var(--accent); border-color: var(--accent); }
#formAlertDiv,
#formThankyouDiv { display: none; margin-bottom: 1rem; }
.form-success { padding: 0.875rem; border: 1px solid #c6f6d5; background: #f0fff4; font-size: 0.9375rem; color: #276749; }
.form-error   { padding: 0.875rem; border: 1px solid #fed7d7; background: #fff5f5; font-size: 0.9375rem; color: #c53030; }

/* ============================================================
   GENERIC CONTENT
   ============================================================ */
.content-wrap,
.content-page { padding: clamp(3rem, 6vw, 5rem) 0; }
.entry-content { max-width: 64ch; margin-left: auto; margin-right: auto; }
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content h1, .entry-content h2, .entry-content h3 {
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; margin-top: 2.5rem;
}
.entry-content h1 { font-size: 1.875rem; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; list-style: revert; }
.entry-content blockquote { border-left: 2px solid var(--rule); padding-left: 1.25rem; color: var(--muted); font-style: italic; }

/* ============================================================
   CODE
   ============================================================ */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: #eef6fb;
  color: #1a6e8e;
  padding: 0.2em 0.45em;
  border-radius: 3px;
}
pre {
  background: var(--dark);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
pre code {
  background: none;
  color: #d4d4d4;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 0.75rem 0;
  background: #333333;
}
.footer-inner {
  font-family: var(--font-headings);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 1.5rem;
  font-weight: normal;
  color: #ffffff;
}
.footer-cta-text {
  font-size: 1.5rem;
  font-weight: normal;
  color: #ffffff;
  margin-left: auto;
}
.footer-cta-send {
  color: var(--accent);
}
.footer-cta-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #c8c8c8;
  color: #ffffff;
  flex-shrink: 0;
  transition: background var(--ease);
}
.footer-icon-link:hover {
  background: var(--accent);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.image-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.5rem 0;
  align-items: flex-start;
}
.image-pair a {
  flex: 1 1 calc(50% - 0.625rem);
  min-width: 240px;
  display: block;
  line-height: 0;
}
.image-pair img {
  width: 100%;
  height: auto;
  display: block;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-muted { color: var(--muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .primary-nav { display: none; }
  .mobile-menu-toggle { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 200px; }

  .hero-services { grid-template-columns: 1fr; }

  .writing-item { grid-template-columns: 4.5rem 1fr; }
  .writing-item > div { min-width: 0; overflow-wrap: break-word; }
  .writing-arrow { display: none; }

  .press-item { grid-template-columns: 1fr; gap: 0.375rem; }
  .press-meta { flex-direction: row; align-items: center; gap: 0.75rem; }
  .press-arrow { display: none; }

  .project-row { grid-template-columns: 1fr; gap: 1.25rem; }

  .contact-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; align-items: center; gap: 0.75rem; }
  .footer-cta-text { margin-left: 0; order: 1; }
  .footer-cta-icons { order: 2; }
  .footer-copy { order: 3; font-size: 0.875rem; }
}

@media (max-width: 480px) {
  .hero-role { gap: 0.4rem; }
  .hero-role span {
    background: var(--surface);
    border: 1px solid var(--rule);
    padding: 0.2rem 0.625rem;
    font-size: 0.8125rem;
  }
  .hero-role span + span::before { display: none; }
  .hero-links { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@media print {
  .site-header, .mobile-nav, .site-footer { display: none; }
}
