/* ==========================================================
   COLORS — change a value here to re-theme the whole site.
   ========================================================== */
:root {
  --bg: #e9f9f6;        /* page background (mint) */
  --bg-alt: #ddf3ef;    /* unused accent background */
  --navy: #2c3247;      /* headings, buttons, dark text */
  --sage: #86ac9f;      /* accent green (name highlight, "Touch") */
  --sage-dark: #6c9689; /* accent green, hover states, stars */
  --ink: #38405a;       /* body text */
  --line: #2c3247;      /* the vertical rail line */
  --white: #ffffff;
  --radius: 14px;
  --max: 1160px;        /* max content width */
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.star { color: var(--sage-dark); margin-right: .5em; font-size: .85em; }

/* Rail */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: clamp(16px, 5vw, 64px);
  width: 2px;
  background: var(--navy);
  opacity: .5;
  z-index: 1;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 64px);
  background: rgba(233, 249, 246, 0.85);
  backdrop-filter: blur(8px);
}

.brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-weight: 500;
  font-size: .95rem;
}

.site-nav a {
  color: var(--navy);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  border-color: var(--sage-dark);
  color: var(--sage-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px clamp(20px, 6vw, 72px) 20px;
  position: relative;
  z-index: 2;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--navy);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--ink);
  opacity: .8;
  max-width: 640px;
  margin-bottom: 48px;
}

/* Hero */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding-top: 40px;
}

.hero-name {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: .98;
  margin: 0 0 20px;
  font-size: clamp(3rem, 9vw, 6.5rem);
}

.hero-name .line { display: block; }
.line.dark { color: var(--navy); }
.line.accent { color: var(--sage); }

.hero-tag {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--ink);
  margin-bottom: 32px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s, background .2s, color .2s;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--sage-dark); transform: translateY(-2px); }

.btn-ghost {
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
  align-items: center;
}

.about-copy h2 {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--navy);
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-top: 0;
}

.about-copy p { max-width: 560px; }

.about-photo img {
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 24px 48px -20px rgba(44, 50, 71, .35);
}

/* Work / Projects */
.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 100px;
}

.project-media-left { grid-template-areas: "media copy"; }
.project-media-left .project-media { grid-area: media; }
.project-media-left .project-copy { grid-area: copy; }

.project-eyebrow {
  display: inline-block;
  font-weight: 600;
  color: var(--sage-dark);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .75rem;
  margin-bottom: 10px;
}

.project-copy h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 14px;
}

.project-copy p { max-width: 480px; }

.stat-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  color: var(--navy);
}

/* Project images: deliberately simple so ANY photo or screenshot you
   drop in — any size, any shape — looks right without extra tweaking. */
.project-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-media img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -20px rgba(44, 50, 71, .35);
}

/* Use on a project-media that holds a tall/narrow image (e.g. a phone
   screenshot) so it doesn't stretch too wide. */
.project-media--narrow img { max-width: 260px; }

/* Use on a project-media with two images to show them side by side. */
.project-media--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 560px;
  width: 100%;
}
.project-media--pair img { max-width: 100%; }

/* Experience */
.timeline { display: flex; flex-direction: column; gap: 44px; }

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
}

.timeline-date {
  font-weight: 600;
  color: var(--sage-dark);
  font-size: .95rem;
  padding-top: 4px;
}

.timeline-body h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 2px;
  font-size: 1.3rem;
}

.timeline-org {
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 14px;
  opacity: .8;
}

.timeline-body ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.education {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid rgba(44, 50, 71, .2);
}

.education h3 {
  font-family: var(--font-head);
  color: var(--navy);
  margin-bottom: 8px;
}

/* Skills */
.skill-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-chips li {
  background: var(--white);
  border: 1px solid rgba(44, 50, 71, .15);
  color: var(--navy);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
}

/* Contact */
.contact { padding-bottom: 140px; }

.contact-title { margin-bottom: 50px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 60px;
  max-width: 640px;
}

.contact-item {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: color .2s, border-color .2s;
}

.contact-item:hover { color: var(--sage-dark); border-color: var(--sage-dark); }

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(20px, 6vw, 72px) 40px;
  color: var(--navy);
  opacity: .7;
  font-size: .85rem;
  position: relative;
  z-index: 2;
}

/* ==========================================================
   RESPONSIVE — tablet and phone layouts.
   ========================================================== */

/* Tablet: two-column layouts collapse to one column, nav still visible. */
@media (max-width: 900px) {
  .site-nav { gap: 18px; font-size: .9rem; }
  .section { padding-top: 72px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; max-width: 320px; margin: 0 auto; }

  .project,
  .project-media-left {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    gap: 28px;
    margin-bottom: 72px;
  }
  .project-media-left .project-media { order: -1; }
  .project-media img,
  .project-media--narrow img { max-width: 420px; margin: 0 auto; }
  .project-media--pair { max-width: 480px; margin: 0 auto; }

  .timeline-item { grid-template-columns: 1fr; gap: 6px; }

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

/* Phone: stacked nav menu behind a hamburger button. */
@media (max-width: 720px) {
  .site-header { padding: 16px 20px; }

  .site-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 24px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    border-bottom: 1px solid rgba(44, 50, 71, .12);
  }
  .site-nav.open { transform: translateY(0); opacity: 1; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid rgba(44, 50, 71, .08); font-size: 1rem; }
  .nav-toggle { display: flex; }

  .rail { left: 12px; }

  .section { padding: 56px 20px 8px; }
  .hero { min-height: auto; padding-top: 48px; padding-bottom: 48px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; }

  .project-media img,
  .project-media--narrow img { max-width: 100%; }
  .project-media--pair { grid-template-columns: 1fr; max-width: 320px; }

  .contact { padding-bottom: 90px; }

  .site-footer { flex-direction: column; gap: 8px; text-align: center; padding: 24px 20px 32px; }
}

/* Very small phones: tighten type scale a touch more. */
@media (max-width: 380px) {
  .hero-name { font-size: clamp(2.6rem, 14vw, 3.4rem); }
  .section-title { font-size: 1.7rem; }
}
