/* ==========================================================
   TOKENS
   ========================================================== */
:root {
  --navy: #2F3C7E;
  --navy-deep: #212B5C;
  --pink: #FBEAEB;
  --pink-deep: #F0D3D6;
  --paper: #FFFBFA;
  --ink: #1C2140;
  --ink-soft: #5C6291;
  --line: #E7DEE0;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--navy-deep);
  margin: 0;
}

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

section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 1.6rem;
  font-weight: 500;
}

p { margin: 0 0 1rem; color: var(--ink); }

ul { list-style: none; margin: 0; padding: 0; }

/* subtle paper grain so the flat color fields don't look sterile */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   LAYOUT SHELL
   ========================================================== */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type { border-bottom: none; }

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.75rem;
}

.mark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.site-header nav {
  display: flex;
  gap: 1.75rem;
}

.site-header nav a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--navy);
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.75rem;
  align-items: center;
  padding-top: 2.5rem;
}

.avatar-default,
.avatar-img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-default {
  background: var(--navy);
  color: var(--pink);
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--pink);
}

.eyebrow-line {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.hero-role {
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.hero-bio {
  max-width: 46ch;
  color: var(--ink-soft);
}

.hero-links {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1.5px solid var(--navy);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--pink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--navy-deep);
}

.btn-ghost {
  color: var(--navy);
  background: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--pink);
}

/* ==========================================================
   ABOUT
   ========================================================== */
.about p {
  max-width: 58ch;
  color: var(--ink-soft);
}

.about p:last-child { margin-bottom: 0; }

/* ==========================================================
   WORK
   ========================================================== */
.project-card {
  border-left: 3px solid var(--navy);
  background: var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 2rem 2.25rem;
}

.project-tag {
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-info p {
  color: var(--ink-soft);
  max-width: 56ch;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 1.4rem;
}

.tech-list li {
  font-size: 0.82rem;
  color: var(--navy-deep);
  background: var(--paper);
  border: 1px solid var(--pink-deep);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy-deep);
  font-weight: 500;
  border-bottom: 1.5px solid var(--navy-deep);
  padding-bottom: 0.1rem;
}

.project-link svg {
  transition: transform 0.15s ease;
}

.project-link:hover svg {
  transform: translate(2px, -2px);
}

/* ==========================================================
   SKILLS
   ========================================================== */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-pills li {
  font-size: 0.95rem;
  color: var(--navy-deep);
  border: 1.5px solid var(--navy);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.skill-pills li:hover {
  background: var(--navy);
  color: var(--pink);
}

/* ==========================================================
   CONTACT
   ========================================================== */
.contact p {
  max-width: 50ch;
  color: var(--ink-soft);
}

.contact-list {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.15s ease, color 0.15s ease;
}

.contact-item:hover {
  padding-left: 0.5rem;
  color: var(--navy);
}

.contact-label {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.contact-value {
  font-weight: 500;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.75rem 3rem;
}

.site-footer p {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 640px) {
  .site-header { padding: 1.5rem; }
  .site-header nav { gap: 1.1rem; }

  .hero {
    grid-template-columns: 1fr;
    text-align: left;
    padding-top: 1.5rem;
  }

  .avatar-default, .avatar-img {
    width: 88px;
    height: 88px;
    font-size: 1.8rem;
  }

  section { padding: 3rem 0; }

  .project-card { padding: 1.5rem; }

  .contact-item { flex-direction: column; gap: 0.2rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Visible keyboard focus */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
