/* ==========================================================================
   Erin Tongay — Portfolio
   Design tokens pulled from the original Framer site.
   ========================================================================== */

:root {
  /* Color palette */
  --navy: #1c2541;        /* headings, dark sections */
  --cream: #f8ffe5;       /* header bar, light text on navy */
  --green: #06d6a0;       /* buttons, card borders, accents */
  --pink: #ef476f;        /* accent shape */
  --pink-text: #d63862;   /* darker pink, WCAG AA-safe for text on white */
  --green-text: #026048;  /* deep green, WCAG AAA (7.58:1) for text on white */
  --yellow: #ffd166;      /* accent shape */
  --slate: #345e6e;       /* secondary text */
  --ink: #2a2a28;         /* footer background */
  --gray: #444444;        /* body text */
  --offwhite: #f3f3f2;    /* project page background */
  --white: #ffffff;

  /* Type */
  --font: "Inter", "Inter Display", -apple-system, "Helvetica Neue", sans-serif;

  /* Layout */
  --container: 1100px;
  --radius: 12px;
}

/* Base ------------------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--gray);
  background: var(--white);
}

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

h1, h2, h3, h4 {
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); }

a { color: var(--navy); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--green);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 214, 160, 0.35);
}

/* Header ----------------------------------------------------------------- */

.site-header {
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo img { height: 44px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
}

.site-nav a:not(.btn):hover { color: var(--slate); }

.site-nav .btn { padding: 10px 20px; }

/* Hero ------------------------------------------------------------------- */

.hero { padding: 90px 0; background: var(--white); }

.hero .container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: center;
}

.hero .eyebrow {
  font-size: 1rem;
  font-weight: 500;
  color: var(--green-text);
  margin: 0 0 12px;
}

.hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }

/* "Hello!" accent — Caveat, a handwritten script against Inter */
.hero .hello {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 1.35em;
  margin-right: 0.18em;
}

.hero p { max-width: 640px; }

/* Decorative shape cluster (recreated from the Framer hero) */
.shape-cluster {
  display: grid;
  grid-template-columns: 90px 90px;
  grid-template-rows: 90px 130px;
  gap: 14px;
}

.shape-cluster .shape-green {
  grid-column: 2;
  grid-row: 1;
  background: var(--green);
  border-radius: 50% 50% 50% 0;
}

.shape-cluster .shape-yellow {
  grid-column: 1;
  grid-row: 2;
  height: 90px;
  background: var(--yellow);
  border-radius: 90px 0 0 0;
  align-self: start;
}

.shape-cluster .shape-pink {
  grid-column: 2;
  grid-row: 2;
  width: 64px;
  background: var(--pink);
  border-radius: 40px;
}

/* Work / project cards ---------------------------------------------------- */

.work {
  background: var(--navy);
  padding: 80px 0 100px;
}

.work h2 { color: var(--cream); margin-bottom: 48px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

.card-body { padding: 24px 24px 28px; }

.card-body h3 { font-size: 1.3rem; }

.card-body p { margin: 0 0 16px; font-size: 0.95rem; }

.card-link { font-weight: 600; color: var(--navy); text-decoration: underline; }

/* Page intro (Projects / Resume) ------------------------------------------ */

.page-intro { padding: 80px 0 40px; }

.page-intro p { max-width: 640px; }

.section-light { background: var(--offwhite); padding: 60px 0 100px; }

/* CTA --------------------------------------------------------------------- */

.cta {
  background: var(--cream);
  text-align: center;
  padding: 90px 0;
}

.cta h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

.cta p { margin: 0 auto 28px; max-width: 480px; }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 40px 0;
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer nav { display: flex; gap: 24px; }

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

.site-footer a:hover { text-decoration: underline; }

/* Project detail pages ----------------------------------------------------- */

.project-page { background: var(--offwhite); }

.project-hero {
  background: var(--navy);
  padding: 70px 0;
}

/* Hero shares the body sections' 820px column so copy and image align */
.project-hero .container { max-width: 820px; }

.project-hero h1 { color: var(--white); }

.project-hero .subtitle {
  font-size: 1.2rem;
  color: var(--cream);
  max-width: 720px;
  margin: 0 0 40px;
}

.project-meta {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  border-top: 1px solid rgba(248, 255, 229, 0.25);
  padding-top: 28px;
}

.project-meta dt {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--green);
  margin-bottom: 4px;
}

.project-meta dd {
  margin: 0;
  font-weight: 600;
  color: var(--white);
}

.project-hero-image img {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.project-hero-image img,
.project-section img {
  border-radius: var(--radius);
  width: 100%;
}

.project-section { padding: 36px 0; }

.project-section .container { max-width: 820px; }

.project-section h3 {
  border-bottom: 3px solid var(--green);
  display: inline-block;
  padding-bottom: 6px;
}

.project-section img {
  margin-top: 28px;
  background: var(--white);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(28, 37, 65, 0.1);
}

.project-section ul { padding-left: 22px; }

.other-projects { padding: 70px 0 90px; }

.other-projects h2 { margin-bottom: 40px; }

.other-projects .card-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }

.other-projects .card-body h3 { font-size: 1.1rem; }

/* Resume ------------------------------------------------------------------- */

/* Resume page shares one 820px column, intro included */
.resume-page .page-intro .container { max-width: 820px; }

.resume-section { padding: 30px 0; }

.resume-section .container { max-width: 820px; }

.resume-section h2 {
  border-bottom: 3px solid var(--green);
  display: inline-block;
  padding-bottom: 6px;
}

.resume-entry { margin-bottom: 36px; }

/* Experience timeline: a dot per role, connected by a line.
   The dot gutter hangs in the left margin so entry text stays
   flush with the section headings; on narrow screens it indents. */
.timeline { margin-top: 28px; margin-left: -40px; }

@media (max-width: 900px) {
  .timeline { margin-left: 0; }
}

.timeline .resume-entry {
  position: relative;
  padding-left: 40px;
  margin-bottom: 44px;
}

.timeline .resume-entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--green);
}

/* Current role gets the pink dot */
.timeline .resume-entry:first-child::before {
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--pink);
}

.timeline .resume-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 30px;
  bottom: -38px;
  width: 2px;
  background: rgba(6, 214, 160, 0.4);
}

.timeline .resume-entry:last-child { margin-bottom: 0; }

.resume-entry .org {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0;
}

.resume-entry .dates { font-size: 0.9rem; color: var(--slate); margin: 0 0 4px; }

.resume-entry .role {
  font-style: italic;
  margin: 0 0 10px;
  color: var(--slate);
}

.resume-entry p { margin-top: 0; }

/* Lightbox ----------------------------------------------------------------- */

.lightbox-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.lightbox-trigger:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 37, 65, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  background: var(--white);
  padding: 12px;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

/* Scroll-reveal animation -------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .shape-cluster { transform: scale(0.8); transform-origin: top left; }
  .card-grid { grid-template-columns: 1fr; }
  .other-projects .card-grid { grid-template-columns: 1fr; }
  .project-meta { gap: 32px; }
  .site-nav { gap: 16px; }
}
