/* style.css */
/* 1. Simple reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.33;
}

/* 2. Design system tokens */
:root {
  --color-bg: #F8F8F8;
  --color-text-primary: #000000;
  --color-text-secondary: #727272;
  --color-border-light: #CCCCCC;
  --color-accent: #004AAD;
  --spacing-unit: 8px;
  --side-padding: 16px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
  --font-family: 'Inter', sans-serif;
  
  /* Typography tokens */
  --type-size-title: 24px;
  --type-size-heading: 20px;
  --type-size-body: 16px;
  --type-size-meta: 14px;
  
  /* New spacing token system */
  --spacing-xsmall: 16px;  /* 2x8 */
  --spacing-small: 24px;   /* 3x8 */
  --spacing-medium: 32px;  /* 4x8 */
  --spacing-large: 64px;   /* 8x8 */
  --spacing-xlarge: 80px;  /* 10x8 */
  --spacing-section: 120px; /* 15x8 */
}

/* 3. Containers and layout */
.container {
  max-width: 948px;
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

/* —— Shared footer —— */
.site-footer { padding: 144px 0 8px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.footer-left { color: var(--color-text-secondary); font-size: var(--type-size-meta); font-weight: 300; }
.footer-right { display: inline-flex; gap: 64px; }
.footer-right .icon-link { padding: 0; border: none; height: auto; }
.footer-right .icon-link img { width: 16px; height: 16px; }
.footer-right .icon-link:hover { transform: none; box-shadow: none; }

/* Ensure the last content block before the footer has no bottom spacing */
main > section:last-of-type { padding-bottom: 0 !important; margin-bottom: 0 !important; }

/* —— About page —— */
.about-page h3 { font-size: var(--type-size-body); font-weight: 500; line-height: 24px; color: var(--color-text-primary); }
.about-page p { color: var(--color-text-secondary); font-weight: 300; font-size: var(--type-size-meta); line-height: 1.5; margin-top: 4px;}

.about-hero { padding: var(--spacing-large) 0 16px; }
.about-hero-inner { display: flex; align-items: center; gap: 16px; }
.about-avatar { width: 50px; height: 50px; border-radius: 200px; object-fit: cover; display: block; }
.about-greeting { font-size: var(--type-size-title); line-height: 32px; font-weight: 600; max-width: 600px; }

.about-badges { padding: 0px 0 0px; }
.about-badges-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.about-summary { padding: 24px 0 0; }
.about-summary .about-summary-text { max-width: 600px; }

.about-skills { padding: var(--spacing-section) 0 var(--spacing-section); }
.about-skills-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.about-skill-card { display: flex; flex-direction: column; gap: 0px; padding-top: 24px; }
.about-skill-card h4 { font-size: var(--type-size-meta); font-weight: 400; color: var(--color-text-primary); }
.about-skill-card p { font-size: var(--type-size-meta); font-weight: 300; }
.about-skill-icon { width: 28px; height: 28px; display: block; margin-bottom: 16px; }

.about-experience { padding: 0 0 var(--spacing-section); }
.about-experience h3 { margin-bottom: 12px; }
.about-exp-entry-link { text-decoration: none; color: inherit; display: block; }
.about-exp-entry { display: flex; flex-direction: column; padding: 12px 0; position: relative; cursor: pointer; }
/* Hover halo behind content; no layout shift */
.about-exp-entry::before {
  content: '';
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: -16px;
  right: -16px;
  background: #EBEBEB;
  border-radius: 8px;
  opacity: 0;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
  pointer-events: none;
}
.about-exp-entry-link:hover .about-exp-entry::before {
  opacity: 1;
}
.about-exp-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 300;}
.about-exp-left { display: flex; align-items: center; gap: 8px; }
.about-exp-logo { width: 17px; height: 17px; border-radius: 4px; object-fit: contain; display: block; }
.about-exp-title { display: inline-flex; gap: 4px; font-size: var(--type-size-meta); line-height: 150%; }
.about-exp-year { color: var(--color-text-secondary); font-size: var(--type-size-meta); font-weight: 300; }
.about-exp-desc { color: var(--color-text-secondary); font-size: var(--type-size-meta); font-weight: 300; line-height: 130%; }

.about-interests { padding: 0 0 var(--spacing-section); }
.about-interests-inner { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.about-interests-text { display: flex; flex-direction: column; max-width: 300px;}
.about-interests-text .about-interests-sub { font-size: var(--type-size-meta); font-weight: 400; color: var(--color-text-primary); margin-top: 24px; margin-bottom: 0px; }
.about-interests-media { width: 100%; max-width: 450px; height: auto; max-height: 220px; border-radius: 8px; display: block; flex-shrink: 1; }

.about-footer { padding-bottom: 8px; padding-top: 144px; }
.about-footer-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.footer-left { color: var(--color-text-secondary); font-size: var(--type-size-meta); font-weight: 300; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-right { display: inline-flex; gap: 24px; }
.footer-right .icon-link { padding: 0; border: none; height: auto; }
.footer-right .icon-link img { width: 18px; height: 18px; }
.footer-right .icon-link:hover { box-shadow: none; }

@media (min-width: 768px) {
  .about-skills-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* 4. Header/nav */
.site-header {
  background: var(--color-bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: var(--spacing-unit) var(--side-padding);
}

/* Constrain site logo image to max 30x30 while allowing responsive shrink */
.site-header .logo {
  display: inline-flex;
  align-items: center;
}
.site-header .logo img {
  display: block;
  max-width: 30px;
  max-height: 30px;
  width: auto;
  height: auto;
  transform-origin: center;
  transition: transform 0.25s ease-in-out;
}

/* Logo rotation animation - desktop only */
@media (min-width: 481px) {
  .site-header .logo img {
    will-change: transform;
  }
}

/* Desktop nav hidden on mobile */
.site-nav ul {
  list-style: none;
  display: none;
}

/* Base nav link styles with text-shadow transition */
.site-header .site-nav a {
  display: inline-block;
  font-size: var(--type-size-meta);
  text-decoration: none;
  transition: transform .15s ease-in-out,
              color .15s ease-in-out,
              text-shadow .15s ease-in-out;
}

/* Active link */
.site-header .site-nav a.active {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--color-text-primary);
  transform: none;
}

/* Inactive links */
.site-header .site-nav a:not(.active) {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: var(--color-text-secondary);
}

/* Hover on non-active */
.site-header .site-nav a:not(.active):hover {
  color: var(--color-text-primary);
  text-shadow: 0.5px 0 0 currentColor;
  transform: scale(1.00);
}

/* 5. Mobile hamburger menu */
.hamburger {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.3s ease;
}
.hamburger img {
  width: 20px;
  height: 20px;
}
.hamburger.active {
  transform: rotate(90deg);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-bg);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile menu content */
.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

/* Close button */
.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
}
.mobile-menu-close::before,
.mobile-menu-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #000;
}
.mobile-menu-close::before { transform: rotate(45deg); }
.mobile-menu-close::after { transform: rotate(-45deg); }

/* Mobile nav links */
.mobile-menu-nav {
  list-style: none;
}
.mobile-menu-nav li {
  margin-bottom: 32px;
}
.mobile-menu-nav a {
  font-size: var(--type-size-body);
  font-weight: 300;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  display: block;
  padding: 12px 24px;
}
.mobile-menu-nav a.active {
  color: var(--color-text-primary);
  font-weight: 400;
}
.mobile-menu-nav a:hover {
  color: var(--color-text-primary);
  transform: scale(1.05);
}

/* 6. Hero */
.hero {
  padding: var(--spacing-large) 0 144px;
  background: var(--color-bg);
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

/* Headline */
.hero h1 {
  position: relative;
  width: 100%;
  max-width: 600px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: var(--type-size-title);
  color: var(--color-text-primary);
}
.hero h1 strong {
  font-weight: 600;
}

/* Subtext */
.subtext {
  width: 100%;
  max-width: 600px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: var(--type-size-body);
  line-height: 24px;
  color: var(--color-text-secondary);
}

/* Hero subtext emphasized links */
.subtext .subtext-link {
  color: inherit;
  text-decoration: none;
}
.subtext .subtext-link strong {
  font-weight: 400;
}
.subtext .subtext-link:hover strong {
  color: #000;
}

/* About summary emphasized links (match hero subtext behavior) */
.about-summary-text .subtext-link {
  color: inherit;
  text-decoration: none;
}
.about-summary-text .subtext-link strong {
  font-weight: 400;
}
.about-summary-text .subtext-link:hover strong {
  color: #000;
}

/* Actions row */
.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 0;
}

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius-lg);
  padding: 4px 12px;
  height: 32px;
  font-size: var(--type-size-meta);
  font-weight: 300;
  color: var(--color-text-secondary);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  cursor: pointer;
}

/* Hover bridge to allow moving from pill to tooltip without flicker */
.status-pill::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  width: 85%;
  height: 12px;
}

.status-text-wrap { position: relative; display: inline-block; }
.status-text { font-weight: 250; line-height: 1; }
/* measurement ghost to lock width */
.status-text--measure {
  position: absolute;
  inset: 0 auto auto 0;
  font-weight: 200;
  visibility: hidden;
  white-space: nowrap;
}

/* Icon links */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #DDDDDD;
  border-radius: var(--radius-lg);
  padding: var(--spacing-unit);
  height: 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.icon-link:hover { box-shadow: var(--shadow-light); transform: translateY(-2px); }
.icon-link img {
  width: 16px;
  height: 16px;
}
.icon-link .hover-icon { display: none; }
.icon-link:hover .hover-icon { display: inline-block; }
.icon-link:hover .default-icon { display: none; }

/* toned-down shadow + 5px lift */
.status-pill:hover { box-shadow: var(--shadow-light); transform: translateY(-2px); }

/* Indicator color on hover */
.status-pill:hover .status-indicator { background: #70DF6C; border-color: #70DF6C; }

/* Tooltip */
.status-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: #F8F8F8;
  color: var(--color-text-primary);
  border: 1px solid #DDDDDD;
  border-radius: 10px;
  padding: 8px 10px;
  width: 85%;
  min-width: 0;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
  cursor: default; /* default arrow in tooltip whitespace */
}

/* Arrow with border (border behind, fill on top) */
.status-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #DDDDDD;
}

.status-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -1px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #F8F8F8;
}

.status-tooltip-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.status-tooltip-text {
  font-size: var(--type-size-meta);
  font-weight: 300;
  color: #727272;
  cursor: text; /* I-beam on text */
}

.status-tooltip-link {
  font-size: var(--type-size-meta);
  color: #000000;
  font-weight: 300;
  text-decoration: none;
  cursor: pointer; /* pointer on link */
  letter-spacing: 0;
}
.status-tooltip-link:hover { font-weight: 400; letter-spacing: -0.1px;}

.status-pill:hover .status-tooltip,
.status-pill .status-tooltip:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
  pointer-events: auto;
}

/* Open state (for mobile click) */
.status-pill.open .status-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
  pointer-events: auto;
}


/* 8. Work cards + animation */
.work-card {
  margin-top: var(--spacing-small);
}

.work-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.work-title {
  display: flex;
  align-items: center;
}

/* Work logo images */
img.work-logo {
  display: block;
  max-width: 20px;
  max-height: 20px;
  width: auto;
  height: auto;
  background: transparent;
}

/* Case study specific logo adjustments */
.work-logo.jumbocode {
  max-width: 20px;
  max-height: 20px;
}

.work-logo.cargurus {
  max-width: 18px;
  max-height: 18px;
}

.work-logo.realityai {
  max-width: 22px;
  max-height: 22px;
}

.work-logo.googlenest {
  max-width: 19px;
  max-height: 19px;
}



.work-title h3 {
  margin-left: 8px;
  font-size: var(--type-size-body);
  font-weight: 400;
  color: #727272; /* Default color */
}

/* Case study specific colors */
.work-title-h3.jumbocode {
  color: #2DB48F; /* JumboCode green */
}

.work-title-h3.cargurus {
  color: #00A1DD; /* CarGurus blue */
}

.work-title-h3.realityai {
  color: #6B46C1; /* Reality AI purple */
}

.work-title-h3.googlenest {
  color: #EA4335; /* Google Nest red */
}

.present-label {
  color: var(--color-text-secondary);
  font-size: var(--type-size-body);
  font-weight: 200;
}

.work-description {
  color: #000;
  font-size: var(--type-size-heading);
  margin-top: 6px;
  font-weight: 400;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-pill {
  border: 0.75px solid #CCCCCC;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: var(--type-size-meta);
  font-weight: 200;
  color: #000;
}

/* enhanced preview + hover animation */
.work-preview {
  margin-top: var(--spacing-xsmall);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 36px 100px;
  overflow: hidden;
  background: var(--color-bg);
  cursor: pointer;
  transition: all 0.35s ease;
  max-width: 900px;
  max-height: 472px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Case study specific preview styling */
.work-preview.jumbocode {
  border-color: #32C89E;
  background: #81DBC2;
  padding-bottom: 0px;
}

.work-preview.jumbocode:hover {
  background: #46CDA7;
  box-shadow: var(--shadow-medium);
}

.work-preview.cargurus {
  border-color: #00A1DD;
  background: #63C4E8;
}

.work-preview.cargurus:hover {
  background: #19AAE0;
  box-shadow: var(--shadow-medium);
}

.work-preview.realityai {
  border-color: #6B46C1;
  background: rgba(107, 70, 193, 0.05);
}

.work-preview.realityai:hover {
  background: rgba(107, 70, 193, 0.1);
  box-shadow: var(--shadow-medium);
}

/* real images scale by width, retain aspect ratio */
.work-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
  transition: transform 0.35s ease;
}

/* placeholders keep the pattern */
.work-preview-placeholder {
  width: 100%;
  height: 472px;
  border-radius: var(--radius-sm);
  background: #E0E0E0;
  background-image:
    linear-gradient(45deg, #F5F5F5 25%, transparent 25%),
    linear-gradient(-45deg, #F5F5F5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #F5F5F5 75%),
    linear-gradient(-45deg, transparent 75%, #F5F5F5 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  transition: transform 0.3s ease;
}

.work-preview:hover .work-preview-placeholder,
.work-preview:hover img {
  transform: scale(1.02);
}

/* 9. Breakpoints */
@media (max-width: 768px) {
  /* Scale down spacing for mobile */
  :root {
    --spacing-xsmall: 12px;  /* 1.5x8 */
    --spacing-small: 16px;   /* 2x8 */
    --spacing-medium: 24px;  /* 3x8 */
    --spacing-large: 48px;   /* 6x8 */
    --spacing-xlarge: 64px;  /* 8x8 */
    --spacing-section: 96px; /* 12x8 */
  }
}

@media (min-width: 480px) {
  .site-nav ul {
    display: flex;
    gap: calc(var(--spacing-unit) * 6);
  }
  .hamburger { display: none; }
  .mobile-menu-overlay { display: none; }
}

@media (min-width: 768px) {
  :root { --side-padding: 24px; }
  .hero .container > * {
    max-width: 600px;
  }
}