/* ===== CSS RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== DESIGN TOKENS ===== */
:root {
  /* Typography */
  --font-heading: "Sora", sans-serif;
  --font-body: "Open Sans", sans-serif;

  /* Font Sizes */
  --text-xs: 14px;
  --text-sm: 16px;
  --text-md: 20px;
  --text-l: 22px;
  --text-lg: 26px;
  --text-xl: 40px;

  /* Font Weights */
  --weight-regular: 400;
  --weight-bold: 700;

  /* Letter Spacing */
  --tracking-none: 0px;
  --tracking-wide: 0.25px;
  --tracking-wider: 0.5px;

  /* Spacing */
  --space-0: 0px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 80px;
  --space-4xl: 120px;

  /* Border Radius */
  --radius-0: 0px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Colors - Global */
  --black-coal: #0d0a09;
  --white-off: #fafafa;
  --grey-dark: #4a4a4a;
  --grey-medium: #898989;
  --grey-light: #dedede;
  --grey-panel: #f2f2f2;
  --blue-subtle: #eef0ff;
  --brand-navy: #002266;
  --brand-royal: #2437ff;
  --brand-mid: #6666ff;
  --brand-light: #ccccff;
  --brand-subtle: #eef0ff;

  /* Light Theme (default) */
  --text-primary: var(--black-coal);
  --text-secondary: var(--grey-dark);
  --text-disabled: var(--grey-medium);
  --bg-default: var(--white-off);
  --bg-surface: var(--grey-panel);
  --bg-subtle: var(--blue-subtle);
  --border-default: var(--grey-medium);
  --accent-default: var(--brand-navy);
  --accent-hover: var(--brand-royal);
}

/* ===== BASE STYLES ===== */


body {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-default);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-none);
}

h2 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-wide);
}

h3 {
  font-size: var(--text-md);
}

h4 {
  font-size: var(--text-sm);
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  /*max-width: 65ch;*/
}

ul {
    margin-top: var(--space-md);
    margin-bottom: var(--space-lg);
    list-style: none; /* remove default bullets */
    padding-left: 0;
    color: var(--text-secondary);
}

ul li {
    position: relative;
    margin-left: var(--space-xl);
}

/* custom ul li bullet */

ul li::before {
    content: "•";
    color: var(--text-secondary);
    position: absolute;
    left: -1rem;
    font-size: 1.3em;
    line-height: 1;
}

a {
  color: var(--accent-default);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Figure captions */
figcaption {
  font-size: var(--text-xs);
  text-align: center;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

/* Expand hint inside clickable images */
.expandable-image {
  display: inline-block;
  position: relative;
  text-align: center;
}

.expand-hint {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.expandable-image:hover .expand-hint,
.expandable-image:focus .expand-hint {
  opacity: 1;
  pointer-events: none;
}

/* Hover effect for clickable images */
figure a img {
  transition: transform 0.2s ease;
}

figure a img:hover {
  transform: scale(1.03);
  cursor: zoom-in;
}

/* Static hero images: no zoom effect or cursor */
.project-hero-image {
  cursor: default;
  transform: none;
  transition: none;
}

/* Optional: remove legacy .caption-hint now */
.caption-hint {
  display: none;
}


/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}
.animate-delay-2 {
  animation-delay: 0.2s;
}
.animate-delay-3 {
  animation-delay: 0.3s;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - var(--space-2xl));
  max-width: 800px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header__logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  color: var(--text-primary);
  text-decoration: none;
}

.header__logo:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.header__nav {
  display: flex;
  gap: var(--space-lg);
}

.header__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent-default);
  letter-spacing: var(--tracking-wider);
  /*text-transform: uppercase;*/
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--accent-default);
  color: var(--white-off);
  align-self: flex-start !important;
  flex: 0 0 auto !important; /* stops inheriting the flex from nexted parent */
  width: auto !important; /* prevents the full-width inheritance*/
  display: inline-block; /* removes block-level full-width behaviour */
  white-space: normal; /* wrap the text */
}

.btn--primary:hover,
.btn--primary:focus {
  background-color: var(--accent-hover);
  color: var(--white-off);
  text-decoration: none;
}

.btn--secondary {
  background-color: transparent;
  color: var(--accent-default);
  border-color: var(--accent-default);
}

.btn--secondary:hover,
.btn--secondary:focus {
  background-color: var(--accent-default);
  color: var(--white-off);
  text-decoration: none;
}

/* ===== HERO SECTION ===== */
.hero {
  padding: var(--space-4xl) 0 var(--space-sm);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent-default);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero__title {
  font-size: clamp(var(--text-lg), 5vw, var(--text-xl));
  margin-bottom: 0;
}

.hero__subhead {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-md), 3vw, var(--text-lg));
  font-weight: var(--weight-bold);
  line-height: 1.3;
  color: var(--text-primary);
  margin-top: calc(var(--space-sm) * -1);
  margin-bottom: var(--space-md);
}


.hero__text {
  font-size: var(--text-md);
}

.hero__image {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Single column hero variant */
.hero--single .hero__grid {
  grid-template-columns: 1fr;
  /*text-align: center;*/
}

.hero--single .hero__content {
  /*align-items: center;*/
}

.hero--single .hero__text {
  /*max-width: 860px;*/
}

.wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%; /* pivot near bottom-left of the emoji */
  animation: wave 2s ease-in-out forwards;
  animation-delay: 0.3s;
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(15deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(15deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(15deg); }
  100% { transform: rotate(0deg); }
}


/* ===== SECTION ===== */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  margin-bottom: var(--space-xl);
}

.section__caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent-default);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.section__title {
  margin-bottom: var(--space-md);
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .bento-grid--5 .bento-card:nth-child(1) {
    grid-column: span 4;
  }
  .bento-grid--5 .bento-card:nth-child(2) {
    grid-column: span 2;
  }
  .bento-grid--5 .bento-card:nth-child(3) {
    grid-column: span 2;
  }
  .bento-grid--5 .bento-card:nth-child(4) {
    grid-column: span 2;
  }
  .bento-grid--5 .bento-card:nth-child(5) {
    grid-column: span 2;
  }

  .bento-grid--3 .bento-card:nth-child(1) {
    grid-column: span 3;
  }
  .bento-grid--3 .bento-card:nth-child(2) {
    grid-column: span 3;
  }
  .bento-grid--3 .bento-card:nth-child(3) {
    grid-column: span 6;
  }
}

.bento-card {
  position: relative;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.bento-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.bento-card__link:hover {
  text-decoration: none;
}

.bento-card__image {
  width: 100%;
  /* aspect-ratio: 16 / 10; */
  object-fit: cover;
}

.bento-card__content {
  padding: var(--space-lg);
}

.bento-card__caption {
  font-size: var(--text-xs);
  color: var(--accent-default);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.bento-card__title {
  font-size: var(--text-l);
  margin-bottom: var(--space-sm);
}

.bento-card__text {
  font-size: var(--text-sm);
}

/* ===== THREE COLUMN INFO ===== */
.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--grey-light);
  border-bottom: 1px solid var(--grey-light);
}

@media (min-width: 768px) {
  .three-col {
    grid-template-columns: repeat(3, 1fr);
  }
}

.three-col__item h3 {
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
}

.three-col__item p {
  font-size: var(--text-sm);
}

/* ===== HIGHLIGHT SECTION ===== */
.highlight {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl);
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .highlight {
    grid-template-columns: 1fr 1fr;
  }
}

.highlight__content h3 {
  margin-bottom: var(--space-md);
}

.highlight__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--white-off);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  width: 100%;/* stacked chips -- delete if I need chip world cloud instead*/
}

/* ===== TWO COLUMN IMAGES ===== */
.two-col-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .two-col-images {
    grid-template-columns: 1fr 1fr;
  }
}

.two-col-images img {
  border-radius: var(--radius-md);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ===== LARGE IMAGE ===== */
.large-image {
  border-radius: var(--radius-md);
  width: 100%;
  margin: var(--space-2xl) 0;
}

/* ===== EXPERIENCE LIST ===== */
.experience-list {
  list-style: none;
  counter-reset: experience;
}

.experience-list p {
    margin-bottom: var(--space-0);
}

.experience-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  /* border-bottom: 1px solid var(--grey-light);*/
}

.experience-item::before {
  counter-increment: experience;
  content: counter(experience, decimal-leading-zero);
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--accent-default);
}

.experience-item h4 {
  font-size: var(--text-md);
  margin-bottom: var(--space-xs);
}

.experience-item p {
  font-size: var(--text-sm);
}

/* ===== BALLOON MESSAGE ===== */
.balloon {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-top: var(--space-2xl);
  position: relative;
}

.balloon::before {
  content: "";
  position: absolute;
  top: -12px;
  left: var(--space-xl);
  width: 24px;
  height: 24px;
  background-color: var(--bg-surface);
  transform: rotate(45deg);
  border-radius: var(--radius-xs);
}

.balloon h3 {
  margin-bottom: var(--space-md);
}

/* ===== FOOTER ===== */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--grey-light);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  /*gap: var(--space-sm);*/
  flex-wrap: wrap;
}

.footer__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-0);
}

.footer__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--accent-default);
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--accent-hover);
}

.footer__link svg {
  width: 24px;
  height: 24px;
}

/* ===== PROJECT PAGE SPECIFIC ===== */
.project-hero-image {
  width: 100%;
  /*max-height: 500px;*/
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.content-block {
  margin-bottom: var(--space-xl);
}

.content-block h2 {
  margin-bottom: var(--space-md);
}

.content-block h3 {
  margin-bottom: var(--space-sm);
}

.content-block h4 {
  margin-bottom: var(--space-sm);
}

/* ===== FOCUS STYLES (Accessibility) ===== */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent-default);
  outline-offset: 2px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-md);
  background-color: var(--accent-default);
  color: var(--white-off);
  z-index: 1000;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-md);
}
