/* ============================================================
   CUSTOM PROPERTIES
   (Tokens are defined in tokens.css — loaded before this file.)
   ============================================================ */

/* ============================================================
   PAGE LOADER
   ============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-slow);
}
#page-loader.is-visible {
  opacity: 1;
  pointer-events: auto;
}
#page-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.loader__star {
  width: var(--space-10);
  height: var(--space-10);
  animation: loader-spin 1.1s linear infinite;
}
.loader__name {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  letter-spacing: -0.01em;
}
@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  min-font-size: var(--text-xs);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--color-nav-bg);
  backdrop-filter: var(--blur-nav);
  -webkit-backdrop-filter: var(--blur-nav);
  border-bottom: var(--border-1) solid var(--color-border);
  z-index: 200;
}

.nav__inner {
  width: 100%;
  padding: 0 var(--container-px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-serif-lg);
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-normal);
  color: var(--color-black);
  transition: opacity var(--ease);
}
.nav__logo:hover { opacity: 0.75; }
.nav__logo-star {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: var(--space-11);
  align-items: center;
}

.nav__link {
  font-size: var(--text-serif-lg);
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  transition: color var(--ease);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: var(--underline-offset); left: 0; right: 0;
  height: var(--border-3);
  background: var(--color-accent);
  border-radius: var(--radius-2xs);
  transform: scaleX(0);
  transition: transform var(--ease);
  transform-origin: left;
}
.nav__link:hover,
.nav__link.active { color: var(--color-text); }
.nav__link:hover::after,
.nav__link.active::after { transform: scaleX(1); }

/* hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-1h);
}
.nav__toggle span {
  display: block;
  width: 22px; height: var(--border-3);
  background: var(--color-text);
  border-radius: var(--radius-2xs);
  transition: transform var(--ease-fast), opacity var(--ease-fast);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--ease);
  text-decoration: none;
  border: none;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 var(--space-2) var(--space-7) var(--color-shadow-accent);
}
.btn--primary:focus-visible {
  outline: var(--border-4) solid var(--color-accent);
  outline-offset: var(--border-4);
}
.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: var(--border-2) solid var(--color-accent);
}
.btn--ghost:hover {
  background: var(--color-light-blue);
}

/* Ghost outline + slide-bubble on hover */
.btn--ghost-slide {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--color-text);
  border: var(--border-1) solid var(--color-border);
  gap: 0;
  transition: color var(--ease-slide), border-color var(--ease-slide);
}
.btn--ghost-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-light-blue);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ease-slide-full);
}
.btn--ghost-slide:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn--ghost-slide:hover::before {
  transform: scaleX(1);
}
.btn--ghost-slide:hover .btn--slide__arrow {
  transform: rotate(45deg);
}

/* Slide-bubble button */
.btn--slide {
  position: relative;
  overflow: hidden;
  background: var(--color-accent);
  color: var(--color-white);
  border: var(--border-2) solid var(--color-accent);
  gap: 0;
  transition: color var(--ease-slide), border-color var(--ease-slide);
}
.btn--slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-light-blue);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ease-slide-full);
}
.btn--slide:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn--slide:hover::before {
  transform: scaleX(1);
}
.btn--slide__text,
.btn--slide__arrow {
  position: relative;
  z-index: 1;
}
.btn--slide__arrow {
  display: inline-flex;
  align-items: center;
  margin-left: var(--space-2);
  transition: transform var(--ease-medium);
}
.btn--slide:hover .btn--slide__arrow {
  transform: rotate(45deg);
}

/* ============================================================
   TAGS
   ============================================================ */
.tag {
  display: inline-block;
  padding: var(--space-1) 12px;
  background: var(--color-white);
  color: var(--color-text-muted);
  border: var(--border-1) solid var(--color-tag-border);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  box-shadow: 0 var(--border-3) 6px var(--color-shadow-xs);
}
.tag--green { background: var(--color-tag-green-bg); color: var(--color-green); }
.tag--red   { background: var(--color-tag-red-bg);   color: var(--color-red); }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps-lg);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.section-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + var(--space-2xl));
  padding-bottom: var(--nav-h);
}

@keyframes star-fall {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg) scale(0.5); opacity: 0; }
}
.star-particle {
  position: fixed;
  top: -60px;
  pointer-events: none;
  z-index: 9999;
  animation: star-fall linear forwards;
}

@keyframes wiggle {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-18deg); }
  40%  { transform: rotate(14deg); }
  60%  { transform: rotate(-9deg); }
  80%  { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}
@keyframes wiggle-hover {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-18deg); }
  40%  { transform: rotate(14deg); }
  60%  { transform: rotate(-9deg); }
  80%  { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.hero__star {
  width: var(--space-13);
  height: var(--space-13);
  object-fit: contain;
  display: block;
  margin-bottom: var(--space-md);
  transform-origin: center center;
  animation: wiggle 0.7s ease-in-out;
  cursor: default;
}
.hero__star:hover {
  animation: wiggle-hover 0.7s ease-in-out;
}

.hero__layout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
}

.hero__body {
  flex: 0 0 auto;
  max-width: 60%;
}

.hero__aside {
  flex: 0 0 auto;
  max-width: 34%;
  padding-bottom: var(--space-1);
}

.hero__aside-text {
  font-size: var(--text-md);
  font-weight: var(--weight-light);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}

.hero__line1 {
  font-size: var(--text-2xl);
  font-family: var(--font-serif);
  display: block;
  position: relative;
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-3);
}
.hero__line1 { padding-bottom: 0; margin-bottom: var(--space-3); }

.hero__statement {
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  color: var(--color-black);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-normal);
  max-width: 100%;
}

.hero__sub {
  display: block;
  font-size: var(--text-md);
  font-weight: var(--weight-light);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}

/* highlighted keywords */
.hl-blue,
.hl-green,
.hl-red,
.hl-navy {
  font-weight: var(--weight-regular);
  font-style: normal;
}
.hl-blue  { color: var(--color-accent); }
.hl-green { color: var(--color-hl-green); }
.hl-red   { color: var(--color-red); }
.hl-navy  { color: var(--color-accent-dark); }

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects {
  padding: 0 0 var(--space-lg);
}

.projects__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
}

.section-divider {
  width: 100%;
  height: var(--space-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8'%3E%3Cpath d='M0 4 Q5 0 10 4 Q15 8 20 4' fill='none' stroke='%23E8ECF2' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center left;
  margin: var(--space-md) 0 var(--space-md);
}

.projects__heading {
  text-align: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.projects__heading--live {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-normal);
  text-transform: none;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: var(--space-md);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-17) var(--space-sm);
}

/* ============================================================
   PROJECT CARD
   ============================================================ */
.card {
  background: transparent;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}
.card:focus-within {
  outline: var(--border-4) solid var(--color-accent);
  outline-offset: var(--border-3);
  border-radius: var(--radius-card);
}

.card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  outline: none;
}

.card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border-radius: var(--radius-card);
}
.card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease-hover);
}
.card:hover .card__thumb img { transform: scale(1.03); }
.card__thumb--2 img { object-position: center 60%; }
.card__thumb--3 img { object-position: center; }
.card__thumb--4 img { object-position: center 58%; }
.card__thumb--5 img { object-position: center; }
.card__thumb--6 img { object-position: center 25%; }
.card--no-link { cursor: default; }
.card--no-link .card__thumb img { opacity: 0.5; }
.card--no-link:hover .card__thumb img { transform: none; }


.card__thumb--coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}
.card__coming-soon {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps-md);
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.5;
}

.card__body {
  padding: var(--space-6) 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-sm);
}

.card__title {
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-1);
}

.card__desc {
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: var(--weight-light);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
  flex: 1;
}

.card__arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  letter-spacing: var(--tracking-wider);
}
.card__arrow svg {
  transition: transform var(--ease);
}
.card:hover .card__arrow svg { transform: translateX(var(--space-1)); }

/* ============================================================
   MINI CARDS (about page)
   ============================================================ */
.mini-cards-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mini-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: var(--border-1) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  overflow: hidden;
}

.mini-card__text {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
}

.mini-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: var(--leading-normal);
}

.mini-card__desc {
  font-size: var(--text-mini-desc);
  font-weight: var(--weight-light);
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
}

.mini-card__images {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
  align-items: start;
}

.mini-card__image-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mini-card__image-placeholder {
  aspect-ratio: 16 / 10;
  background: var(--color-thumb-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mini-card__image-placeholder--portrait {
  aspect-ratio: 3 / 4;
}

.mini-card__image-placeholder img,
.mini-card__image-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-card__caption {
  font-size: var(--text-xs);
  font-weight: var(--weight-light);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

/* Single full-width image variant */
.mini-card__images--single {
  grid-template-columns: 1fr;
  padding-left: var(--space-md);
}
.mini-card__images--single .mini-card__image-item {
  width: 100%;
}
.mini-card__images--single .mini-card__image-placeholder {
  width: 100%;
}
.mini-card__images--single .mini-card__image-placeholder img {
  object-position: center center;
}

.mini-card__link-btn {
  margin-top: var(--space-3);
  padding: 7px var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

/* Compact ghost-slide button used in mini-card and experience section */
.mini-card__link-btn,
.exp-linkedin-btn {
  padding: 7px var(--space-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  border-radius: var(--radius-sm);
  align-self: flex-start;
}
.mini-card__link-btn { margin-top: var(--space-3); }

@media (max-width: 768px) {
  .mini-card { flex-direction: column; }
  .mini-card__text { flex: none; padding: var(--space-md); }
  .mini-card__images { padding: 0 var(--space-md) var(--space-md); }
}

@media (max-width: 480px) {
  .mini-card__images { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-bg);
  position: relative;
  padding: var(--space-11) 0;
  margin-top: var(--space-lg);
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--space-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8'%3E%3Cpath d='M0 4 Q5 0 10 4 Q15 8 20 4' fill='none' stroke='%23E8ECF2' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: top left;
}

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

.footer__tagline {
  font-size: var(--text-serif-lg);
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  color: var(--color-text);
}

.footer__star-img {
  width: var(--space-8);
  height: var(--space-8);
  object-fit: contain;
  flex-shrink: 0;
}

.footer__links {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-serif-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  transition: color var(--ease);
  position: relative;
}
.footer__social-link::after {
  content: '';
  position: absolute;
  bottom: calc(-1 * var(--space-0)); left: 0; right: 0;
  height: var(--border-1);
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--ease);
  transform-origin: left;
}
.footer__social-link:hover { color: var(--color-text); }
.footer__social-link:hover::after { transform: scaleX(1); }

.footer__social-sep {
  display: inline-flex;
  align-items: center;
  align-self: center;
  color: var(--color-text-muted);
  font-size: var(--text-serif-sm);
  padding: 0 var(--space-2);
  height: 1em;
  line-height: 1;
  transform: translateY(-0.05em);
}
.footer__social-sep {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-serif-sm);
}

/* Vertical divider */
.footer__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex-shrink: 0;
  width: var(--space-11);
}
.footer__divider::after {
  content: '';
  display: block;
  width: var(--space-13);
  height: var(--space-13);
  background-image: url('../images/star.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Nav columns */
.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: var(--space-19);
  align-items: flex-start;
}

.footer__divider + .footer__col { margin-left: var(--space-15); }
.footer__col + .footer__col    { margin-left: var(--space-11); }
.footer__col-heading {
  font-size: var(--text-serif-lg);
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  display: inline-block;
  border-bottom: var(--border-3) solid var(--color-accent);
  padding-bottom: var(--space-1);
}
.footer__link {
  font-size: var(--text-serif-sm);
  color: var(--color-text-muted);
  transition: color var(--ease);
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.footer__link::before {
  content: '• ';
  color: var(--color-text-muted);
}
.footer__link::after {
  content: '';
  position: absolute;
  bottom: var(--underline-offset); left: 0; right: 0;
  height: var(--border-3);
  background: var(--color-accent);
  border-radius: var(--radius-2xs);
  transform: scaleX(0);
  transition: transform var(--ease);
  transform-origin: left;
}
.footer__link:hover { color: var(--color-text); }
.footer__link:hover::after { transform: scaleX(1); }

/* Projects 2-column sub-grid */
.footer__projects {
  display: flex;
  gap: var(--space-9);
}
.footer__projects-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-section {
  padding-top: calc(var(--nav-h) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.about-label {
  font-size: var(--text-serif-xl);
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-md);
  display: inline-block;
  border-bottom: var(--border-3) solid var(--color-accent);
  padding-bottom: var(--space-1);
}

.about-bio p.about-label {
  font-size: var(--text-serif-xl);
}
.about-bio p {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: var(--weight-light);
  color: var(--color-text);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-md);
}

.about-skills {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-skills li {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: var(--weight-light);
  color: var(--color-text);
  padding: var(--space-3) 0;
  border-top: var(--border-1) solid var(--color-border);
  line-height: var(--leading-snug);
}

.about-skills li:last-child {
  border-bottom: var(--border-1) solid var(--color-border);
}

/* ============================================================
   EXPERIENCE SECTION (about page)
   ============================================================ */
.exp-section {
  padding-bottom: var(--space-2xl);
}

.exp-split {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-16);
  align-items: start;
}

.exp-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.exp-blurb {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

/* Grid lives on the list; rows use subgrid so columns stay aligned */
.exp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  column-gap: var(--space-sm);
}

.exp-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding: var(--space-3) 0;
  border-top: var(--border-1) solid var(--color-border);
  align-items: center;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: var(--weight-light);
  line-height: var(--leading-normal);
  color: var(--color-text);
}

.exp-row:last-child {
  border-bottom: var(--border-1) solid var(--color-border);
}

.exp-company {
  font-weight: var(--weight-regular);
}

.exp-date {
  white-space: nowrap;
}

/* ============================================================
   WORK PAGE
   ============================================================ */
.work-section {
  padding-top: calc(var(--nav-h) + var(--space-xl));
  padding-bottom: var(--space-2xl);
}
.work-section .section-title {
  margin-bottom: var(--space-lg);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

/* ============================================================
   PAGE HERO (Work + other inner pages)
   ============================================================ */
.page-hero {
  padding-top: calc(var(--nav-h) + var(--space-xl));
  padding-bottom: var(--space-lg);
  border-bottom: var(--border-1) solid var(--color-border);
  margin-bottom: var(--space-xl);
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--space-sm);
}
.page-hero p {
  font-size: var(--text-md);
  font-weight: var(--weight-light);
  color: var(--color-text-muted);
  max-width: 560px;
}

/* ============================================================
   SCROLL HINT
   ============================================================ */
.scroll-hint {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.scroll-hint__line {
  width: var(--space-9); height: var(--border-1);
  background: var(--color-border);
}

/* ============================================================
   MEDIA — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1300px) {
  /* Tighten footer brand so columns don't overflow */
  .footer__brand { flex: 0 0 40%; padding-right: var(--space-9); }
  .footer__divider + .footer__col { margin-left: var(--space-9); }
  .footer__col + .footer__col { margin-left: var(--space-md); }
}

@media (max-width: 1024px) {
  .projects__grid { gap: var(--space-6) var(--space-3); }
}

@media (max-width: 1200px) {
  :root {
    --container-px: 20px;
    --space-xl: 56px;
    --space-2xl: 72px;
  }

  .about-grid {
    grid-template-columns: 1fr 360px;
    gap: var(--space-13);
  }

  /* Footer: stack */
  .footer__inner { flex-direction: column; gap: var(--space-md); align-items: stretch; }
  .footer__col { margin-left: 0 !important; width: 100%; }
  .footer__divider { display: none; }
  .footer__brand { flex: none; width: 100%; padding-right: 0; padding-bottom: calc(var(--space-md) + var(--space-2)); position: relative; }
  .footer__brand::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: var(--space-2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8'%3E%3Cpath d='M0 4 Q5 0 10 4 Q15 8 20 4' fill='none' stroke='%23E8ECF2' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom left;
  }
  .footer__tagline { font-size: var(--text-serif-md); }
  .footer__col-heading { font-size: var(--text-serif-md); }

  /* Stack social links */
  .footer__social-sep { display: none; }
  .footer__social-link { display: block; margin-top: var(--space-1); }
  .footer__social-link::before { content: '• '; color: var(--color-text-muted); }
  .footer__social-link::after { display: none; }
}

/* ============================================================
   MEDIA — TABLET PORTRAIT (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --container-px: 16px;
    --space-xl: 64px;
    --space-2xl: 96px;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    border-bottom: var(--border-1) solid var(--color-border);
    padding: var(--space-xs) 0;
    box-shadow: 0 var(--space-2) var(--space-md) var(--color-shadow-md);
  }
  .nav__links.is-open {
    display: flex;
  }
  .nav__link {
    padding: var(--space-4) var(--container-px);
    font-size: var(--text-serif-lg);
  }
  .nav__link::after { display: none; }
  .nav__toggle { display: flex; }

  .projects__header { flex-direction: column; align-items: flex-start; }
  .hero__layout { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
  .hero__body, .hero__aside { max-width: 100%; }

  .projects__grid,
  .work-grid { grid-template-columns: 1fr; gap: var(--space-8); }

  /* Footer: stack and bullet list */
  .footer__inner { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
  .footer__star-img { display: none; }
  .footer__links { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .footer__social-sep { display: none; }
  .footer__social-link { margin-top: 0; }
  .footer__social-link::before { content: '• '; color: var(--color-text-muted); }

  .about-split {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .exp-split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .exp-list {
    grid-template-columns: 1fr auto;
  }

  .exp-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: var(--border-3);
  }

  .exp-company { grid-column: 1; grid-row: 1; }
  .exp-role    { grid-column: 1; grid-row: 2; color: var(--color-text-muted); font-size: var(--text-sm); }
  .exp-date    { grid-column: 2; grid-row: 1; }

  .footer__inner { flex-direction: column; gap: var(--space-md); align-items: stretch; }
  .footer__col { margin-left: 0 !important; width: 100%; }
  .footer__brand { text-align: left; width: 100%; padding-right: 0; padding-bottom: calc(var(--space-md) + var(--space-2)); position: relative; }
  .footer__brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--space-2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8'%3E%3Cpath d='M0 4 Q5 0 10 4 Q15 8 20 4' fill='none' stroke='%23E8ECF2' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom left;
  }
  .footer__brand-name { justify-content: flex-start; }
  .footer__divider { display: none; }
  .footer__social-sep { display: none; }
  .footer__social-link {
    display: block;
    margin-top: var(--space-1);
  }
  .footer__social-link::before {
    content: '• ';
    color: var(--color-text-muted);
  }
  .footer__social-link::after { display: none; }
  .footer__link::before {
    content: '• ';
    color: var(--color-text-muted);
  }
  .footer__link::after { display: none; }
}

/* ============================================================
   MEDIA — MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --container-px: 20px;
    --space-xl: 56px;
    --space-2xl: 80px;
  }

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

  .card__body { padding: var(--space-sm) var(--space-md) var(--space-6); }
  .card__title { font-size: var(--text-md); }
  .card__desc  { font-size: var(--text-base); }
}

/* ============================================================
   FOCUS STYLES (accessibility)
   ============================================================ */
:focus-visible {
  outline: var(--border-3) solid var(--color-accent);
  outline-offset: var(--border-4);
  border-radius: var(--radius-xs);
}

/* ============================================================
   VIDEO / GIF SUPPORT
   ============================================================ */
.card__thumb video,
.card__thumb .gif-wrap {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
