/* ═══════════════════════════════════════════════════
   ANIRACH MINGKHWAN — Editorial Magazine Portfolio
   ═══════════════════════════════════════════════════ */

/* ── 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: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  background: #e8f0fe;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Utility ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: inherit; font-weight: 600; font-size: 0.9rem;
  border: none; cursor: pointer; transition: all 0.3s ease;
}
.btn--pill {
  padding: 0.65em 1.6em;
  border-radius: 100px;
}
.btn--primary {
  background: #6366f1; color: #fff;
}
.btn--primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(99,102,241,0.35);
}
.btn__arrow {
  font-size: 1.2em; transition: transform 0.3s;
}
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ── Reveal animation ── */
[data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1),
              transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
[data-reveal].revealed {
  opacity: 1; transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(232,240,254,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 30px rgba(0,0,0,0.06);
  padding: 0.8rem 0;
}
.nav__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  font-size: 1.35rem; font-weight: 800;
  letter-spacing: -0.02em; color: #0f172a;
}
.nav__links {
  display: flex; gap: 2.2rem;
}
.nav__links a {
  font-size: 0.92rem; font-weight: 500;
  color: #334155; letter-spacing: 0.01em;
  position: relative; transition: color 0.3s;
}
.nav__links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: #6366f1; border-radius: 2px;
  transition: width 0.3s;
}
.nav__links a:hover { color: #6366f1; }
.nav__links a:hover::after { width: 100%; }
.nav__right { display: flex; align-items: center; gap: 1rem; }

/* Hamburger */
.nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav__hamburger span {
  width: 24px; height: 2px; background: #0f172a;
  border-radius: 2px; transition: all 0.3s;
}

/* ═══════════════════════════════════════════════════
   HERO — Magazine Cover
   ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  background: linear-gradient(160deg, #e8f0fe 0%, #dde6fb 30%, #d0d9f7 55%, #c7d2fe 100%);
  overflow: hidden;
  padding-bottom: 4rem;
}

/* Giant watermark behind everything */
.hero__bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  font-size: clamp(6rem, 18vw, 22rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: rgba(99,102,241,0.06);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* Side labels */
.hero__labels {
  position: absolute;
  left: 3rem; top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  display: flex; gap: 0.5em;
  white-space: nowrap;
  z-index: 5;
}
.hero__label {
  font-size: 0.78rem;
  color: rgba(15,23,42,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__label--bold {
  font-weight: 700;
  color: rgba(15,23,42,0.7);
}

/* Portrait */
.hero__portrait {
  position: relative;
  z-index: 2;
  width: clamp(300px, 40vw, 520px);
  margin-top: 6rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 8px 24px rgba(99,102,241,0.08);
  opacity: 0.55;
  mix-blend-mode: luminosity;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0) 100%);
}
.hero__img {
  width: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Giant name at bottom */
.hero__name-row {
  position: relative;
  z-index: 10;
  width: 100%;
  text-align: center;
  margin-top: -7rem;
}
.hero__name {
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow:
    0 2px 30px rgba(99,102,241,0.25),
    0 0 60px rgba(196,207,255,0.3);
}
.hero__name--light {
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════
   ABOUT — Editorial
   ═══════════════════════════════════════════════════ */
.about {
  position: relative;
  background: linear-gradient(180deg, #c7d2fe 0%, #dde6fb 40%, #e8f0fe 100%);
  padding: 8rem 0 6rem;
  overflow: hidden;
}
.about__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2.5rem;
  position: relative;
}
.about__label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 2.5rem;
}
.about__editorial {
  max-width: 800px;
  position: relative; z-index: 3;
}
.about__big-text {
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  font-weight: 300;
  line-height: 1.35;
  color: #1e293b;
}
.about__big-text strong {
  font-weight: 700;
  color: #0f172a;
}

/* Faded portrait bg */
.about__portrait-bg {
  position: absolute;
  right: -5%; top: -10%;
  width: 45%; max-width: 500px;
  opacity: 0.08;
  z-index: 1;
  pointer-events: none;
}
.about__portrait-img {
  width: 100%;
  filter: grayscale(100%);
}

/* Floating card */
.about__card {
  margin-top: 4rem;
  position: relative; z-index: 5;
  display: flex; justify-content: flex-end;
}
.about__card-inner {
  display: flex; gap: 2.5rem;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 700px;
  box-shadow: 0 20px 60px rgba(99,102,241,0.08),
              0 1px 3px rgba(0,0,0,0.04);
}
.about__card-photo {
  flex-shrink: 0;
  width: 160px; height: 200px;
  border-radius: 16px; overflow: hidden;
}
.about__card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.about__card-text h3 {
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 0.3rem;
}
.about__card-title {
  font-size: 0.85rem; color: #6366f1;
  font-weight: 500; margin-bottom: 1rem;
}
.about__card-text p {
  font-size: 0.92rem; line-height: 1.7;
  color: #475569; margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   RESEARCH — Glassmorphism Grid
   ═══════════════════════════════════════════════════ */
.research {
  background: linear-gradient(180deg, #e8f0fe 0%, #eff3ff 50%, #e8f0fe 100%);
  padding: 7rem 0;
}
.research__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2.5rem;
}
.research__label {
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #6366f1; margin-bottom: 1rem;
}
.research__heading {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300; line-height: 1.2;
  margin-bottom: 3.5rem; color: #1e293b;
}
.research__heading strong { font-weight: 800; }

.research__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
.research__card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 20px;
  padding: 2.2rem;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s;
}
.research__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(99,102,241,0.1);
}
.research__icon {
  font-size: 2.2rem; margin-bottom: 1rem;
}
.research__card h3 {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 0.6rem; color: #0f172a;
}
.research__card p {
  font-size: 0.88rem; line-height: 1.65;
  color: #64748b;
}

/* ═══════════════════════════════════════════════════
   PROJECTS — Editorial Cards
   ═══════════════════════════════════════════════════ */
.projects {
  background: linear-gradient(180deg, #e8f0fe 0%, #dde6fb 100%);
  padding: 7rem 0;
}
.projects__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2.5rem;
}
.projects__label {
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #6366f1; margin-bottom: 1rem;
}
.projects__heading {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300; line-height: 1.2;
  margin-bottom: 3.5rem; color: #1e293b;
}
.projects__heading strong { font-weight: 800; }

.projects__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.8rem;
}
.projects__card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex; flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s;
}
.projects__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(99,102,241,0.1);
}
.projects__card--wide {
  grid-row: span 2;
}
.projects__card-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #6366f1;
  background: rgba(99,102,241,0.08);
  padding: 0.35em 0.9em;
  border-radius: 100px;
  margin-bottom: 1.2rem;
  width: fit-content;
}
.projects__card h3 {
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 0.8rem; color: #0f172a;
}
.projects__card p {
  font-size: 0.92rem; line-height: 1.7;
  color: #64748b; flex-grow: 1;
}
.projects__link {
  margin-top: 1.5rem;
  font-size: 0.9rem; font-weight: 600;
  color: #6366f1;
  display: inline-flex; align-items: center; gap: 0.4em;
}

/* ═══════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════ */
.contact {
  background: linear-gradient(180deg, #dde6fb 0%, #c7d2fe 100%);
  padding: 7rem 0 5rem;
  text-align: center;
}
.contact__inner {
  max-width: 800px; margin: 0 auto;
  padding: 0 2.5rem;
}
.contact__label {
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #6366f1; margin-bottom: 1rem;
}
.contact__heading {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300; line-height: 1.2;
  margin-bottom: 1rem; color: #1e293b;
}
.contact__heading strong { font-weight: 800; }
.contact__sub {
  font-size: 1.05rem; color: #64748b;
  margin-bottom: 3rem; line-height: 1.6;
}
.contact__links {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 1rem;
}
.contact__pill {
  display: inline-flex; align-items: center; gap: 0.6em;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 100px;
  padding: 0.85em 1.8em;
  font-size: 0.92rem; font-weight: 600;
  color: #1e293b;
  transition: all 0.3s;
}
.contact__pill:hover {
  background: #6366f1; color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99,102,241,0.25);
}
.contact__pill svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   BLOG
   ═══════════════════════════════════════════════════ */
.blog {
  padding: 8rem 0;
  background: linear-gradient(180deg, #f0f4ff 0%, #e8f0fe 100%);
}
.blog__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2.5rem;
}
.blog__label {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em;
  color: #6366f1; text-transform: uppercase; margin-bottom: 1rem;
}
.blog__heading {
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300;
  color: #0f172a; line-height: 1.2; margin-bottom: 0.75rem;
}
.blog__heading strong { font-weight: 800; }
.blog__sub {
  font-size: 1.05rem; color: #64748b; max-width: 600px; margin-bottom: 3rem;
}
.blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.25rem;
}
.blog__card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.blog__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}
.blog__card-image {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f8fafc;
}
.blog__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog__card:hover .blog__card-image img {
  transform: scale(1.03);
}
.blog__card-body {
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog__card-tags {
  display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap;
}
.blog__tag {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: #6366f1;
  background: rgba(99,102,241,0.08); padding: 0.25rem 0.65rem;
  border-radius: 20px;
}
.blog__card-body h3 {
  font-size: 1.2rem; font-weight: 700; color: #0f172a;
  line-height: 1.4; margin-bottom: 0.6rem;
}
.blog__card-body p {
  font-size: 0.9rem; color: #64748b; line-height: 1.6;
  flex: 1; margin-bottom: 1rem;
}
.blog__card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: #94a3b8;
}
.blog__read-more {
  color: #6366f1; font-weight: 600;
  transition: color 0.2s;
}
.blog__card:hover .blog__read-more { color: #4f46e5; }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.footer {
  background: #0f172a;
  padding: 2rem 0;
}
.footer__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2.5rem;
  display: flex; align-items: center;
  justify-content: space-between;
}
.footer__logo {
  color: #fff; font-weight: 700;
  font-size: 1rem;
}
.footer__copy {
  color: #94a3b8; font-size: 0.82rem;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .research__grid { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: 1fr; }
  .projects__card--wide { grid-row: auto; }
}

@media (max-width: 768px) {
  /* Nav */
  .nav__links {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(232,240,254,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2rem; z-index: 999;
  }
  .nav__links.open { display: flex; }
  .nav__links a { font-size: 1.5rem; }
  .nav__hamburger { display: flex; z-index: 1001; }
  .nav__right .btn { display: none; }

  /* Hero */
  .hero__labels { display: none; }
  .hero__portrait { width: 70vw; margin-top: 7rem; }
  .hero__name { font-size: clamp(2.5rem, 12vw, 5rem); }
  .hero__name-row { margin-top: -3rem; }

  /* About */
  .about { padding: 5rem 0 4rem; }
  .about__card-inner {
    flex-direction: column; gap: 1.5rem;
    max-width: 100%;
  }
  .about__card-photo { width: 100%; height: 220px; }
  .about__card { justify-content: center; }

  /* Research */
  .research__grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer__inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .nav__inner { padding: 0 1.2rem; }
  .about__inner,
  .research__inner,
  .projects__inner,
  .contact__inner { padding: 0 1.2rem; }
  .hero__name { font-size: 2.5rem; }
}
