/* ================================================
   LAHEWORKS — Design System & Styles
   ================================================ */

/* --- Design Tokens --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-surface: #101010;
  --bg-card: #151515;
  --bg-card-hover: #1a1a1a;
  --text-primary: #f0ece4;
  --text-secondary: #9a9590;
  --text-muted: #5a5550;
  --accent: #c8956c;
  --accent-light: #d4a67e;
  --accent-dim: rgba(200, 149, 108, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay for premium texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

img {
  display: block;
  max-width: 100%;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Section Common --- */
.section {
  padding: 8rem 0;
  position: relative;
}

.section__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 3.5rem;
  color: var(--text-primary);
}

/* ================================================
   NAVIGATION
   ================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background-color var(--transition), padding var(--transition), transform var(--transition);
}

.nav--solid {
  background-color: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.nav--hidden {
  transform: translateY(-100%);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color var(--transition);
}

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

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.nav__links a:hover::after {
  width: 100%;
}

.nav__cta {
  padding: 0.5rem 1.25rem !important;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  transition: all var(--transition) !important;
}

.nav__cta:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.nav__cta::after {
  display: none !important;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all var(--transition);
  transform-origin: center;
}

.nav__toggle.active span:first-child {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav__toggle.active span:last-child {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* ================================================
   HERO
   ================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 25% 45%, rgba(200, 149, 108, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 55%, rgba(200, 149, 108, 0.04) 0%, transparent 50%),
    var(--bg-primary);
}

.hero__content {
  animation: heroFadeIn 1.2s ease-out;
}

.hero__label {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: heroFadeIn 1.2s ease-out 0.5s both;
}

.hero__scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ================================================
   ABOUT
   ================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about__text h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.about__highlights {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color var(--transition), background-color var(--transition);
}

.highlight-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.highlight-card__number {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}

.highlight-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.highlight-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ================================================
   SERVICES
   ================================================ */
.services {
  background: var(--bg-surface);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ================================================
   PORTFOLIO
   ================================================ */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: rgba(200, 149, 108, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card__image {
  position: absolute;
  inset: 0;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.project-card:hover .project-card__image img {
  transform: scale(1.06);
}

.project-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 50%;
  transition: opacity var(--transition);
}

.project-card__tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-card__overlay h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.project-card__overlay p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 320px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s ease;
}

.project-card:hover .project-card__overlay p {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   PROCESS
   ================================================ */
.process {
  background: var(--bg-surface);
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  position: relative;
}

/* connecting line */
.process__steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border);
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.process-step:hover .process-step__number {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.process-step h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0 0.5rem;
}

/* ================================================
   CREDENTIALS
   ================================================ */
.credentials__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.credentials__education {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.credential-entry {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.credential-entry__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex-shrink: 0;
  position: relative;
}

.credential-entry__dot::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: calc(100% + 24px);
  background: var(--border);
}

.credential-entry:last-child .credential-entry__dot::after {
  display: none;
}

.credential-entry h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.credential-entry__institution {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.credential-entry p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.credentials__skills h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  background: transparent;
}

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

/* ================================================
   CONTACT
   ================================================ */
.contact {
  text-align: center;
  padding: 10rem 0;
}

.contact__content h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.contact__content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.contact__cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent);
  padding: 1rem 2.5rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

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

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

.footer .container {
  display: flex;
  justify-content: center;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ================================================
   SCROLL REVEAL ANIMATIONS
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger delays for grid children */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.35s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }
.reveal[data-delay="6"] { transition-delay: 0.45s; }

/* ================================================
   RESPONSIVE — Tablet
   ================================================ */
@media (max-width: 1024px) {
  .section {
    padding: 6rem 0;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .process__steps {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }

  .credentials__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ================================================
   RESPONSIVE — Mobile
   ================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 5rem 0;
  }

  /* Nav mobile */
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }

  .nav__links.active {
    transform: translateX(0);
  }

  .nav__links a {
    font-size: 1.5rem;
    color: var(--text-primary);
  }

  .nav__cta {
    font-size: 1rem !important;
    padding: 0.75rem 2rem !important;
  }

  /* Hero mobile */
  .hero__title {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  /* Services mobile */
  .services__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Portfolio mobile */
  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-card {
    aspect-ratio: 3 / 2;
  }

  .project-card__overlay p {
    opacity: 1;
    transform: translateY(0);
  }

  /* Process mobile — vertical */
  .process__steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .process__steps::before {
    top: 0;
    bottom: 0;
    left: 27px;
    right: auto;
    width: 1px;
    height: 100%;
  }

  .process-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1rem;
    text-align: left;
    align-items: start;
  }

  .process-step__number {
    margin-bottom: 0;
  }

  .process-step h3 {
    margin-top: 0.25rem;
  }

  .process-step p {
    padding: 0;
    grid-column: 2;
  }

  /* Contact mobile */
  .contact {
    padding: 6rem 0;
  }

  .contact__cta {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero__label {
    font-size: 0.7rem;
  }

  .highlight-card {
    padding: 1.25rem;
  }

  .service-card {
    padding: 1.75rem 1.5rem;
  }

  .project-card__overlay {
    padding: 1.25rem;
  }
}
