:root {
  --bg: #fffaf5;
  --paper: #ffffff;
  --ink: #0b0b0c;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #ff6600;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
}

/* Base */
body {
  margin: 0;
  font: 16px/1.5 system-ui, Segoe UI, Roboto, Inter, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1120px; margin: auto; padding: 0 16px; }

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}
.nav a { margin-left: 12px; }
.logo { font-weight: 700; letter-spacing: -0.01em; }

/* Hero */
.hero-center { text-align: center; padding: 80px 16px; }
.hero-meta {
  font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--ink);
  text-transform: uppercase;
}
.hero-email { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.2rem; }
.hero-name {
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 900; margin: 0.2em 0;
  letter-spacing: -0.02em; color: var(--accent);
  display: inline-block; /* JS may add .bounce */
}
/* Optional bounce (if used) */
.bounce { animation: bounce 1.5s ease; }
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

.hero-role { font-size: 1.5rem; font-weight: 800; color: #333; margin-top: 0; }

/* Experience Grid */
.exp-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 800px) { .exp-grid { grid-template-columns: 1fr; } }

.exp-card {
  text-align: center; padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 24px; background: var(--paper);
  box-shadow: var(--shadow);
}
.exp-years {
  display: flex; justify-content: center; align-items: baseline;
  gap: .6rem; line-height: 1; margin-bottom: .5rem;
}
.exp-number {
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 900; letter-spacing: -0.02em;
  color: var(--accent);
}
.exp-unit {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900; color: var(--accent);
}
.exp-sub { font-weight: 800; margin: .4rem 0 .2rem; color: #111; }
.exp-note { margin: 0; color: var(--muted); }

/* Work */
.work-hero { text-align: center; padding-top: 56px; }
.work-head { margin-bottom: 10px; }
.work-title {
  margin: 0 0 4px;
  font-weight: 900; letter-spacing: 0.02em;
  font-size: clamp(28px, 4.4vw, 44px); color: #111;
}
.work-sub { margin: 0 0 14px; color: var(--muted); font-weight: 700; }
.work-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.work-link { display: grid; gap: 6px; text-decoration: none; }
/* Smooth scale on hover */
.work-link .work-name { transition: transform 0.3s ease, color 0.3s ease; }
.work-link:hover .work-name,
.work-link:focus-visible .work-name { color: var(--accent); transform: scale(1.04); }

.work-name {
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-size: clamp(28px, 5vw, 56px);
  color: color-mix(in oklab, var(--ink) 25%, transparent);
}
.work-meta {
  font-size: 14px; color: var(--muted);
  opacity: 0; transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.work-link:hover .work-meta,
.work-link:focus-visible .work-meta { opacity: 1; transform: translateY(0); }

/* Sections */
.section { padding: 40px 0; }

/* Buttons */
.btn {
  display: inline-block; padding: .6rem 1rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper);
}
.links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.btn-primary {
  background: var(--accent); color: #fff;
  border-color: transparent; font-weight: 700;
}
.btn-primary:hover { filter: brightness(0.95); }

/* ABOUT */
.about-hero { text-align: center; padding: 40px 0; padding-bottom: 80px; }
.about-title { font-weight: 900; font-size: clamp(28px, 4.4vw, 44px); margin: 0; color: #111; }
.about-sub { margin: 6px 0 16px; color: var(--muted); font-weight: 700; }
.about-intro {
  font-size: clamp(22px, 3.2vw, 40px);
  font-weight: 900;
  line-height: 1.15;
  color: color-mix(in oklab, var(--ink) 22%, transparent);
  max-width: 900px;
  margin: 0 auto;
}

/* CONNECT FOOTER (orange, scroll-zoom handled by JS) */
.connect-footer{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:32px;
  padding:60px 40px;
  background:var(--accent);
  color:#fff;
  flex-wrap:wrap;
  border-top:0;
  transform-origin: center top;
}
.connect-left{flex:1; min-width:260px;}
.connect-title{
  font-weight:900;
  font-size:clamp(36px,6vw,72px);
  line-height:1.05;
  margin:0 0 12px;
}
.connect-email{ font-size:1rem; font-weight:700; opacity:.95; margin:0 0 20px; }
.connect-copy{ font-size:.9rem; opacity:.85; margin:0; }

.connect-right{ display:flex; flex-direction:column; gap:12px; min-width:200px; }
.connect-right a{
  color:#fff; font-weight:800; text-decoration:none; letter-spacing:.01em;
  transition:opacity .2s ease, transform .2s ease;
}
.connect-right a:hover{ opacity:.8; transform:translateX(2px); }

/* Mobile */
@media (max-width: 768px){
  .connect-footer{ flex-direction:column; text-align:center; padding:44px 20px; }
  .connect-right{ align-items:center; }
}

/* Ensure MY WORK never has a white background box */
#work.section { background: transparent !important; }

.rec-card {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 60px auto;
  max-width: 960px;
}

/* Avatar frame (same as before) */
.avatar-frame {
  width: clamp(160px, 22vw, 260px);
  aspect-ratio: 1 / 1;
  background: #ffa366;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  overflow: hidden;
  transform: rotate(-4deg);
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px 12px 20px 8px; /* top, right, bottom, left */
  transform: rotate(4deg);
  display: block;
}

/* Text styling */
.rec-text {
  flex: 1;
}

.rec-title {
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 12px;
  color: var(--ink);
}

.rec-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .rec-card {
    flex-direction: column;
    text-align: center;
  }
  .avatar-frame {
    margin-bottom: 20px;
  }
}

.ref-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  gap: 40px;              /* more space between them */
  flex-wrap: wrap;
}

.ref-link {
  display: grid;
  gap: 6px;
  text-decoration: none;
  text-align: left;
}

.ref-name {
  font-weight: 900;
  font-size: 1.25rem;     /* bigger (≈20px) */
  letter-spacing: -0.01em;
  color: color-mix(in oklab, var(--ink) 30%, transparent);
  transition: transform 0.3s ease, color 0.3s ease;
}

.ref-meta {
  font-size: 0.9rem;      /* slightly bigger meta too */
  color: var(--muted);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ref-link:hover .ref-name,
.ref-link:focus-visible .ref-name {
  color: var(--accent);
  transform: scale(1.05); /* a little zoom on hover */
}

.ref-link:hover .ref-meta,
.ref-link:focus-visible .ref-meta {
  opacity: 1;
  transform: translateY(0);
}
.btn-primary.cv-btn {
  margin-top: 24px; /* adjust value for more/less space */
}
/* Compact, uniform, no-crop gallery */
.gallery{
  --thumb-h: 170px;                 /* << change this to make all cards bigger/smaller */
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0,1fr));
  align-items: start;
}

.g-card{
  height: var(--thumb-h);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);

  display: flex;                    /* center media */
  justify-content: center;
  align-items: center;
}

.g-card img, .g-card video{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;              /* ✅ scaled down, no cropping */
  display: block;
}

/* Wide banner (e.g., mail signature) */
.g-wide{ grid-column: span 2; }

/* Responsive */
@media (max-width: 900px){
  .gallery{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-wide{ grid-column: span 2; }
}
@media (max-width: 520px){
  .gallery{ grid-template-columns: 1fr; }
  .g-wide{ grid-column: span 1; }
}

.back-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;

  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transition: filter .2s ease, transform .2s ease;
}

.back-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
}
.charity-image {
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: center;       /* center vertically (if taller than viewport) */
  padding: 20px 0;
}

.charity-image img {
  max-width: 90%;            /* fill most of the container */
  max-height: 600px;         /* ✅ bigger but not too tall */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.photo-hero {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 56vh;
  transition: height .35s ease;
  background: transparent;
}

/* Base slide */
.photo-hero .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;          /* fill the frame (no white bars) */
  border-radius: inherit;     /* keep rounded edges on the image itself */
  background: transparent;    /* no background fill */
  opacity: 0;
  z-index: 0;
  transition: opacity .6s ease, transform .6s ease;
}

/* Must come AFTER the base rule so it wins */
.photo-hero .slide.is-visible {
  opacity: 1;
  z-index: 1;
}

/* Optional zoom */
.photo-hero:hover .slide.is-visible {
  transform: scale(1.03);
}

