/* ============================================
   Design System
   ============================================ */

:root {
  /* Colors */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --text-primary: #F5F5F5;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --accent: #F59E0B;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-headline: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 120px 0;
  --container-width: 1100px;
  --container-padding: 0 32px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================
   Reset & Base
   ============================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 {
  transition-delay: 0.12s;
}

.reveal--delay-2 {
  transition-delay: 0.24s;
}

.reveal--delay-3 {
  transition-delay: 0.36s;
}

.reveal--delay-4 {
  transition-delay: 0.48s;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: all 0.4s var(--ease-out);
  animation: logoFloat 4s ease-in-out infinite;
}

.nav__logo-img:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
  opacity: 1;
  transform: scale(1.12);
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

/* Mobile Toggle */
.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__mobile-toggle.active span:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav__mobile-toggle.active span:last-child {
  transform: rotate(-45deg) translate(1px, -1px);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(30px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__link {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__aurora {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: var(--container-padding);
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.hero__name {
  font-family: var(--font-headline);
  font-size: clamp(52px, 9vw, 110px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -3px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  letter-spacing: 0.3px;
  transition: border-color 0.3s ease, color 0.3s ease;
}

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

.chip--small {
  font-size: 11px;
  padding: 4px 10px;
}

.chip--accent {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  padding: 12px 24px;
  border: 1px solid var(--accent);
  transition: background 0.3s ease, color 0.3s ease;
}

.hero__cta:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.hero__cta svg {
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

/* ============================================
   Section Shared Styles
   ============================================ */

.section {
  padding: var(--section-padding);
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 56px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.section__title {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* ============================================
   About Section
   ============================================ */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  margin-bottom: 48px;
  align-items: start;
}


.about__photo {
  position: sticky;
  top: 100px;
  align-self: start;
}

.about__photo-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.about__photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(245, 158, 11, 0);
  transition: border-color 0.5s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

.about__photo-frame:hover::after {
  border-color: rgba(245, 158, 11, 0.3);
}

.about__photo-img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.3) brightness(0.9);
  transition: all 0.6s var(--ease-out);
}

.about__photo-frame:hover .about__photo-img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.02);
}

.about__narrative p {
  font-size: 31px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.about__narrative p:first-child {
  color: var(--text-primary);
  font-size: 33px;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.stat-card {
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-card__number {
  display: block;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ============================================
   Case Studies Section
   ============================================ */

.case-studies__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.case-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.06);
}

.case-card--placeholder {
  cursor: default;
  opacity: 0.7;
}

.case-card--placeholder:hover {
  border-color: var(--border-hover);
  transform: none;
  box-shadow: none;
}

/* Case Card Background Image Reveal */
.case-card__bg-image {
  position: absolute;
  inset: 0;
  background-image: var(--card-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  z-index: 0;
}

.case-card__bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.7) 0%, rgba(22, 22, 22, 0.92) 100%);
}

.case-card--has-image:hover .case-card__bg-image {
  opacity: 1;
}

.case-card--has-image>*:not(.case-card__bg-image) {
  position: relative;
  z-index: 1;
}

.case-card--has-image {
  overflow: hidden;
}

.case-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.case-card__number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.case-card__role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  padding: 3px 8px;
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
}

.case-card__title {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.case-card__company {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.case-card__description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
  flex-grow: 1;
}

.case-card__metric {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.case-card__metric-value {
  display: block;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.case-card__metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.case-card__cta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.case-card:hover .case-card__cta {
  color: var(--accent);
}

.case-card__cta--soon {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   Projects Section
   ============================================ */

.projects__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.project-card {
  display: block;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-card--featured {
  border-color: rgba(245, 158, 11, 0.12);
}

.project-card--featured:hover {
  border-color: var(--accent);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.project-card__title {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 600;
}

.project-card__links {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.project-card__description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.project-card__before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.project-card__comparison {
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.project-card__comparison-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.project-card__comparison-list {
  list-style: none;
  padding: 0;
}

.project-card__comparison-list li {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 14px;
  position: relative;
}

.project-card__comparison-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.project-card__comparison:first-child .project-card__comparison-list li::before {
  background: var(--text-muted);
}

.project-card__comparison:last-child .project-card__comparison-list li::before {
  background: var(--accent);
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

/* Project Card Showcase Image */
.project-card__showcase {
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.project-card__showcase-img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.6s var(--ease-out);
}

.project-card:hover .project-card__showcase-img {
  transform: scale(1.02);
}

/* ============================================
   Writing & Speaking Section
   ============================================ */

.writing__subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.articles__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.article-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.06);
}

.article-card__thumb {
  width: 140px;
  min-height: 120px;
  flex-shrink: 0;
  overflow: hidden;
}

.article-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.article-card:hover .article-card__thumb-img {
  transform: scale(1.08);
}

.article-card__body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-card__title {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.article-card__cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

/* Speaking Info */
.speaking__info {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
}

.speaking__description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.speaking__stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Speaking Gallery */
.speaking-gallery {
  margin-top: 24px;
}

.speaking-gallery__track {
  columns: 3;
  column-gap: 16px;
}

.speaking-gallery__item {
  break-inside: avoid;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
}

.speaking-gallery__item:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.08);
}

.speaking-gallery__img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(0.85) brightness(0.8);
  transition: all 0.6s var(--ease-out);
}

.speaking-gallery__item:hover .speaking-gallery__img {
  filter: grayscale(0) brightness(1.05);
  transform: scale(1.03);
}

/* Legacy writing-card styles kept for compatibility */
.writing__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.writing-card {
  display: block;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
}

.writing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.writing-card__icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.writing-card__title {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.writing-card__description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.writing-card__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.writing-card__stats {
  display: flex;
  gap: 8px;
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
  text-align: center;
  padding: 120px 32px;
}

.contact__headline {
  font-family: var(--font-headline);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.contact__subtext {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact__links {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg-primary);
  border: 1px solid var(--accent);
  transition: all 0.3s ease;
  font-weight: 500;
}

.contact__btn:hover {
  background: transparent;
  color: var(--accent);
}

.contact__btn--outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.contact__btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
}

.footer__text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .nav__mobile-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__photo {
    position: relative;
    top: auto;
    max-width: 360px;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-studies__grid {
    grid-template-columns: 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .articles__grid {
    grid-template-columns: 1fr;
  }

  .article-card__thumb {
    width: 100px;
    min-height: 90px;
  }

  .speaking__info {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .speaking-gallery__track {
    columns: 2;
  }

  .writing__grid {
    grid-template-columns: 1fr;
  }

  .hero__name {
    letter-spacing: -1px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 80px 0;
    --container-padding: 0 20px;
  }

  .nav {
    padding: 16px 20px;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card__number {
    font-size: 22px;
  }

  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .hero__meta {
    gap: 6px;
  }

  .project-card__before-after {
    grid-template-columns: 1fr;
  }

  .project-card__header {
    flex-direction: column;
  }
}