:root{
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --text: #0f172a;
    --muted: #6b7280;
    --muted-soft: #d1d5db;
    --muted-hard: #374151;
    --accent: #2563eb;
    --accent-soft: #e0edff;
    --accent-warm: #f97316;
    --accent-warm-soft: #ffedd5;
    --radius-lg: 24px;
    --radius-md: 18px;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
}

html{
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
        system-ui, sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

body{
    margin: 0;
}

main{
    max-width: 960px;
    margin: 0 auto;
    padding: 5rem 1.5rem 6rem;
}

h1, h2, h3, h4{
    margin: 0 0 0.4rem 0;
}

h1{
    font-size: clamp(2.2rem, 3vw + 1.8rem, 3rem);
    letter-spacing: -0.03em;
    margin-bottom: 1vh;
}

h2{
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    margin-bottom: 1vh;
}

h3{
    font-size: 1.30rem;
    font-weight: 500;
}

p{
    margin: 0;
    font-size: 1.05rem;
    font-weight: 300;
}

.dates {
    font-size: 1rem;
    text-transform: capitalize;
    color: var(--muted);
    margin-bottom: 8px;
}

.eyebrow{
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.blurb{
    margin-top: 0.3rem;
    line-height: 1.55;
    color: var(--muted-hard);
}

a {
    color: var(--accent-warm);
    text-decoration: none;
}

a:hover {
    text-decoration-line: underline;
    text-decoration-color: var(--accent-warm);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;

    background-image: linear-gradient(
        120deg,
        #2563eb,
        #4f46e5,
        #ec4899,
        #f97316
    );
    background-size: 400% auto;
    animation: gradientText 3s ease-in-out infinite alternate;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

section {
    margin-top: 10vh;
}

/* Intro */ 

#intro {
    margin-top: 20vh;
}

.profile{
    width: 120px;
    height: 120px;
    border-radius: 25px;
    margin-bottom: 1.2rem;
    object-fit: cover;
}

/* Work and projects */
.position {
    margin-top: 10px;
    margin-bottom: 30px;
}

.positiondescription {
    margin-top: 8px;
    margin-bottom: 8px;
    color: var(--muted-hard);
}

.projectlist{
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.projectrow{
  display: grid;
  grid-template-columns: 1fr 200px; /* text | image */
  gap: 3rem;
  align-items: center;
  background: none;
  border-radius: var(--radius-md);
}

.projectinfo{
  min-width: 0; /* overflow avoidance */
}

.projectdesc{
  margin: 0;
  color: var(--muted-hard);
  line-height: 1.5;
}

/* 2:1 image */
.projectmedia{
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 8px;
  overflow: hidden;
}

.projectmedia img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px){
  .projectrow{
    grid-template-columns: 1fr;
  }

  .projectmedia{
    order: -1;
  }
}


/* =========== Bottom nav =========== */

.snap-nav{
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.snap-nav a{
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--muted);
    padding: 0.35rem 0.1rem;
}

.snap-nav a:hover{
    color: var(--text);
}

.muted{
    color: var(--muted);
}

.smaller{
    font-size: 0.95rem;
}

.spaceabove{
    margin-top: 8px;
    display: inline-block;
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}