/* ==========================================================================
   Ethan Hunt — portfolio
   Direction: clean, modern, editorial. Warm off-white ground, near-black
   text, one restrained navy accent. A serif for headings, a humanist sans
   for everything else. Minimal motion, no cards, no glow.
   ========================================================================== */

:root {
  --bg: #f7f5f0;
  --bg-alt: #efece4;
  --fg: #1c1b18;
  --fg-dim: #56534a;
  --fg-faint: #8b8778;
  --accent: #2e3f56;
  --accent-line: rgba(46, 63, 86, 0.35);
  --line: #ddd8cb;
  --line-soft: #e7e2d5;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;

  --maxw: 1000px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 560; margin: 0; color: var(--fg); }
p { margin: 0 0 1em; color: var(--fg-dim); max-width: 62ch; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px; z-index: 1000;
  font-family: var(--font-body); font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ---------- links ---------- */
.project-links a, .social-list a, .back-to-top, .hero-links a {
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.project-links a:hover, .social-list a:hover, .back-to-top:hover, .hero-links a:hover {
  color: var(--accent);
  border-color: var(--accent-line);
}

/* ---------- layout helpers ---------- */
.section { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 100px 32px; }
.section-head { margin-bottom: 44px; }
.section-title { font-size: clamp(24px, 3.2vw, 32px); font-weight: 560; }

/* ---------- header / nav ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 32px;
  border-bottom: 1px solid var(--line-soft);
  max-width: var(--maxw); margin: 0 auto;
}
.logo { font-family: var(--font-display); font-weight: 600; font-size: 18px; }

.site-nav ul { display: flex; gap: 28px; }
.site-nav a {
  font-size: 14px; color: var(--fg-dim);
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.site-nav a:hover, .site-nav a.active { color: var(--fg); border-color: var(--accent-line); }

@media (max-width: 640px) {
  .site-nav { display: none; }
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 96px 32px 108px;
}
.hero-inner { max-width: 680px; }

.kicker {
  font-size: 13px; color: var(--fg-faint); letter-spacing: 0.02em; margin-bottom: 22px;
}
.hero-statement {
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.28;
  letter-spacing: -0.005em;
  margin-bottom: 22px;
  max-width: 17ch;
}
.hero-sub { font-size: 17px; margin-bottom: 34px; max-width: 52ch; }

.hero-links { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; }
.hero-links a { padding: 4px 14px; border-bottom: none; border-right: 1px solid var(--line); }
.hero-links a:first-child { padding-left: 0; }
.hero-links a:last-child { border-right: none; }

/* ---------- reveal-on-load / scroll animation ---------- */
.reveal {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.hero-inner .reveal[data-delay="0"] { transition-delay: 0.05s; }
.hero-inner .reveal[data-delay="1"] { transition-delay: 0.15s; }
.hero-inner .reveal[data-delay="2"] { transition-delay: 0.26s; }
.hero-inner .reveal[data-delay="3"] { transition-delay: 0.36s; }

/* ---------- about ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start;
}
.about-copy p { font-size: 16px; }
.about-copy strong { color: var(--fg); font-weight: 600; }

.about-photo { margin: 0 0 0 auto; max-width: 200px; }
.photo-frame { background: var(--bg-alt); border: 1px solid var(--line); padding: 10px; }
.photo-frame img {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover;
}
.about-photo figcaption {
  font-family: var(--font-display); font-style: italic; font-size: 14px;
  color: var(--fg-faint); text-align: center; margin-top: 10px;
}

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { margin: 0; max-width: 160px; }
}

/* ---------- experience ---------- */
.experience-groups { display: flex; flex-direction: column; gap: 48px; }

.experience-group-title {
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--fg-faint); font-weight: 600; margin-bottom: 6px;
}

.experience-list { display: flex; flex-direction: column; }

.experience-row {
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
}
.experience-row:last-child { border-bottom: 1px solid var(--line-soft); }

.experience-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.experience-top h4 { font-size: 18px; font-weight: 560; }
.experience-dates {
  font-size: 13px; color: var(--fg-faint); white-space: nowrap; flex-shrink: 0;
}

.experience-org {
  font-family: var(--font-display); font-style: italic; color: var(--fg-faint);
  font-size: 14.5px; margin: 4px 0 10px !important;
}
.experience-row p:last-child { font-size: 15px; }

/* ---------- projects ---------- */
.project-list { display: flex; flex-direction: column; }

.project-row {
  display: flex; gap: 22px;
  padding: 34px 0;
  border-top: 1px solid var(--line-soft);
}
.project-row:last-child { border-bottom: 1px solid var(--line-soft); }

.project-index {
  font-family: var(--font-display); font-style: italic; font-size: 18px;
  color: var(--fg-faint); flex-shrink: 0; padding-top: 2px; width: 1.4em;
}

.project-main h3 {
  font-size: 21px; margin-bottom: 10px;
  display: inline-block;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease);
}
.project-row:hover .project-main h3 { background-size: 100% 1px; }

.project-main p { font-size: 15px; margin-bottom: 10px; }
.project-note {
  font-family: var(--font-display); font-style: italic; color: var(--fg-faint);
  font-size: 14.5px; margin-bottom: 12px !important;
}
.project-meta { font-size: 13px; color: var(--fg-faint); margin-bottom: 12px; }

.project-links { display: flex; gap: 18px; font-size: 13.5px; }

@media (max-width: 640px) {
  .project-row { gap: 14px; }
}

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.skill-group h3 {
  font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--fg-faint); font-weight: 600; margin-bottom: 18px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.tag-list li {
  font-size: 13.5px; padding: 6px 12px;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--fg-dim);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tag-list li:hover { border-color: var(--accent-line); color: var(--accent); }
.tag-note { color: var(--fg-faint); font-size: 11.5px; }

@media (max-width: 760px) {
  .skills-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- contact ---------- */
.contact-inner { max-width: 480px; }
.contact-heading { font-size: clamp(26px, 3.6vw, 34px); line-height: 1.2; margin-bottom: 14px; }
.contact-sub { font-size: 15px; margin-bottom: 28px; }

.email-copy {
  font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--fg);
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 4px 0; cursor: pointer; transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.email-copy:hover { color: var(--accent); border-color: var(--accent-line); }
.email-hint { font-size: 12px; color: var(--fg-faint); margin-top: 8px; margin-bottom: 28px; }
.email-copy.copied { color: #3f6b4a; border-color: #3f6b4a; }

.social-list { display: flex; gap: 22px; font-size: 14px; }

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px 32px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 12.5px; color: var(--fg-faint);
}
