/* =========================================================
   Huynh Thanh Son — Portfolio
   Layout inspired by the provided slide deck design.
   Palette: forest-green artistic hero + light-grey content.
   ========================================================= */

:root {
  --green-deep:   #0a2417;
  --green-mid:    #14532d;
  --green-bright: #4ade80;
  --green-glow:   #86efac;
  --lime:         #84cc16;
  --accent:       #65a30d;

  --light:        #ededed;
  --light-2:      #f5f5f5;
  --ink:          #1f2933;
  --ink-soft:     #4b5563;
  --muted:        #9ca3af;
  --line:         #d7d7d7;

  --maxw: 1320px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--green-bright); color: var(--green-deep); }

/* ----- Reveal on scroll ----- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled {
  background: rgba(237, 237, 237, .82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav__logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: #fff;
  transition: color .4s var(--ease);
}
.nav.scrolled .nav__logo { color: var(--ink); }

.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav__links a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: rgba(255,255,255,.85);
  position: relative;
  transition: color .3s var(--ease);
}
.nav.scrolled .nav__links a { color: var(--ink-soft); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .3s var(--ease);
}
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a:hover { color: var(--green-bright); }
.nav.scrolled .nav__links a:hover { color: var(--accent); }

.nav__right { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .5px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.nav.scrolled .lang-toggle { background: #fff; border-color: var(--line); color: var(--ink); }
.lang-toggle span { opacity: .5; transition: opacity .25s; }
.lang-toggle span.is-active { opacity: 1; color: var(--green-bright); }
.nav.scrolled .lang-toggle span.is-active { color: var(--accent); }
.lang-toggle .lang-sep { opacity: .4; color: inherit; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: #fff; transition: all .3s var(--ease); }
.nav.scrolled .nav__burger span { background: var(--ink); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 12%, rgba(132,204,22,.18), transparent 55%),
    radial-gradient(80% 60% at 50% 100%, rgba(74,222,128,.22), transparent 60%),
    linear-gradient(160deg, #06160e 0%, var(--green-deep) 38%, var(--green-mid) 100%);
}
.hero__bg::after {
  /* soft jungle vignette */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 120% at 50% 45%, transparent 40%, rgba(0,0,0,.55) 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: .55;
  animation: float 12s ease-in-out infinite;
}
.orb--1 { width: 420px; height: 420px; left: 8%;  top: 18%; background: radial-gradient(circle, #4ade80, transparent 70%); }
.orb--2 { width: 520px; height: 520px; right: 4%; top: 30%; background: radial-gradient(circle, #166534, transparent 70%); animation-delay: -4s; }
.orb--3 { width: 360px; height: 360px; left: 40%; bottom: -6%; background: radial-gradient(circle, #84cc16, transparent 70%); animation-delay: -8s; opacity: .4; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-40px) translateX(20px); }
}

.particles { position: absolute; inset: 0; }
.particles i {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-glow);
  box-shadow: 0 0 12px var(--green-glow);
  opacity: .7;
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(20px) scale(.6); opacity: 0; }
  15%  { opacity: .8; }
  100% { transform: translateY(-110vh) scale(1); opacity: 0; }
}

.hero__content { position: relative; z-index: 2; padding: 0 20px; }
.hero__eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(.8rem, 2vw, 1.15rem);
  letter-spacing: .35em;
  color: rgba(255,255,255,.9);
  margin-bottom: .4rem;
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3.4rem, 16vw, 12rem);
  line-height: .92;
  letter-spacing: -.02em;
  text-shadow: 0 8px 60px rgba(74,222,128,.35);
}
.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 6vw, 80px);
  margin-top: 1.2rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .2em;
  font-size: clamp(.8rem, 1.6vw, 1.1rem);
}
.hero__year { color: var(--green-bright); }

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.hero__scroll i {
  width: 22px; height: 34px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 12px;
  position: relative;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 6px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--green-bright);
  animation: scrolldot 1.6s var(--ease) infinite;
}
@keyframes scrolldot { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 80% { opacity: 0; top: 18px; } 100% { opacity: 0; } }

/* =========================================================
   SECTION LABELS (shared)
   ========================================================= */
.section-label {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .04em;
  margin: 28px 0 14px;
  color: var(--ink);
}

/* =========================================================
   ABOUT ("Hello!")
   ========================================================= */
.about {
  background: var(--light);
  padding: clamp(90px, 12vh, 140px) clamp(20px, 5vw, 64px) 48px;
}
.about__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.3fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.photo-frame {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 24px 60px rgba(0,0,0,.14);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  background: linear-gradient(150deg, #14532d, #4ade80);
  color: #fff;
}
.photo-placeholder span { font-family: var(--font-head); font-weight: 900; font-size: 3rem; letter-spacing: 2px; }
.photo-placeholder small { font-size: .72rem; opacity: .85; text-align: center; white-space: pre-line; }

.about__hello { display: flex; align-items: center; gap: 16px; }
.about__hello h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -.02em;
}
.about__mascot {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(150deg, #ef4444, #b91c1c);
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(185,28,28,.4);
}
.about__intro { color: var(--ink-soft); margin-top: 14px; max-width: 46ch; }
.about__intro--small { margin-top: 12px; }
.about__block { margin-bottom: 16px; }
.about__block strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: .98rem; }
.about__block span { color: var(--ink-soft); font-size: .9rem; }

/* skills tiles */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 320px;
}
.skill-tile {
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.skill-tile:hover { transform: translateY(-5px); background: var(--accent); }

/* contact bar */
.about__contacts {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--ink-soft);
  transition: color .3s var(--ease);
}
.contact-pill:hover { color: var(--accent); }

/* simple inline icons */
.ic { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: inline-grid; place-items: center; flex: none; position: relative; }
.ic::before { content: ""; position: absolute; inset: 0; background: #fff; -webkit-mask-size: 15px; mask-size: 15px; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.ic-phone::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.62 10.79a15.5 15.5 0 006.59 6.59l2.2-2.2a1 1 0 011.02-.24 11.4 11.4 0 003.58.57 1 1 0 011 1V20a1 1 0 01-1 1A17 17 0 013 4a1 1 0 011-1h3.5a1 1 0 011 1 11.4 11.4 0 00.57 3.58 1 1 0 01-.24 1.02l-2.21 2.19z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.62 10.79a15.5 15.5 0 006.59 6.59l2.2-2.2a1 1 0 011.02-.24 11.4 11.4 0 003.58.57 1 1 0 011 1V20a1 1 0 01-1 1A17 17 0 013 4a1 1 0 011-1h3.5a1 1 0 011 1 11.4 11.4 0 00.57 3.58 1 1 0 01-.24 1.02l-2.21 2.19z'/%3E%3C/svg%3E"); }
.ic-mail::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V6a2 2 0 00-2-2zm0 4l-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V6a2 2 0 00-2-2zm0 4l-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); }
.ic-git::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 00-3.16 19.49c.5.09.68-.22.68-.48v-1.7c-2.78.6-3.37-1.34-3.37-1.34-.45-1.16-1.11-1.47-1.11-1.47-.91-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.08 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.09.39-1.98 1.03-2.68-.1-.25-.45-1.27.1-2.65 0 0 .84-.27 2.75 1.02a9.5 9.5 0 015 0c1.91-1.29 2.75-1.02 2.75-1.02.55 1.38.2 2.4.1 2.65.64.7 1.03 1.59 1.03 2.68 0 3.84-2.34 4.68-4.57 4.93.36.31.68.92.68 1.85v2.74c0 .27.18.58.69.48A10 10 0 0012 2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 00-3.16 19.49c.5.09.68-.22.68-.48v-1.7c-2.78.6-3.37-1.34-3.37-1.34-.45-1.16-1.11-1.47-1.11-1.47-.91-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.08 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.09.39-1.98 1.03-2.68-.1-.25-.45-1.27.1-2.65 0 0 .84-.27 2.75 1.02a9.5 9.5 0 015 0c1.91-1.29 2.75-1.02 2.75-1.02.55 1.38.2 2.4.1 2.65.64.7 1.03 1.59 1.03 2.68 0 3.84-2.34 4.68-4.57 4.93.36.31.68.92.68 1.85v2.74c0 .27.18.58.69.48A10 10 0 0012 2z'/%3E%3C/svg%3E"); }

/* =========================================================
   PROJECTS DIVIDER
   ========================================================= */
.divider {
  background: var(--light-2);
  padding: clamp(70px, 10vh, 120px) clamp(20px, 5vw, 64px);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 100%;
}
.divider__text h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: .92;
  letter-spacing: -.03em;
}
.divider__text p {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}
.feature-card__thumb {
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 900;
  font-size: 2.4rem; color: #fff;
  min-height: 260px;
}
.feature-card__body { padding: 28px 30px; }
.feature-card__body h3 { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; line-height: 1.15; }
.feature-card__role, .proj-card__role { color: var(--accent); font-weight: 600; font-size: .85rem; margin: 6px 0 12px; }
.feature-card__body p { color: var(--ink-soft); font-size: .95rem; }

/* =========================================================
   PROJECTS GRID
   ========================================================= */
.grid-section {
  background: var(--light);
  padding: clamp(40px, 7vh, 80px) clamp(20px, 5vw, 64px) clamp(70px, 10vh, 120px);
}
.proj-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
.proj-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.proj-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px rgba(0,0,0,.16); }
.proj-card__thumb {
  min-height: 170px;
  display: grid; place-items: center;
  font-size: 3.4rem;
}
.proj-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.proj-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.proj-card__head h3 { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
.proj-card__date { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.proj-card__body > p { color: var(--ink-soft); font-size: .92rem; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 18px; }
.tags span {
  font-size: .74rem;
  font-weight: 600;
  background: rgba(101,163,13,.1);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
}

.links { display: flex; gap: 10px; margin-top: auto; }
.btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .85rem;
  padding: 9px 18px;
  border-radius: 999px;
  transition: all .3s var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: var(--accent); transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* stack summary card */
.proj-card--stack { background: var(--ink); color: #fff; }
.proj-card--stack h3 { color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; }
.proj-card--stack .proj-card__role { color: var(--green-bright); }
.stack-list { margin-top: 16px; display: grid; gap: 14px; }
.stack-list div { display: grid; gap: 2px; }
.stack-list span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-glow); }
.stack-list b { font-weight: 500; font-size: .9rem; color: rgba(255,255,255,.92); }

/* project thumbnail gradients */
.thumb-hrm    { background: linear-gradient(135deg, #134e4a, #2dd4bf); }
.thumb-keycap { background: linear-gradient(135deg, #1e293b, #64748b); }
.thumb-book   { background: linear-gradient(135deg, #7c2d12, #f59e0b); }
.thumb-food   { background: linear-gradient(135deg, #713f12, #d97706); }
.proj-card__thumb span, .feature-card__thumb span { filter: drop-shadow(0 6px 14px rgba(0,0,0,.3)); }

/* =========================================================
   THANK YOU / CONTACT
   ========================================================= */
.thanks {
  position: relative;
  min-height: 100vh;
  background: var(--light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px clamp(20px, 5vw, 64px);
}
.thanks__center { text-align: center; }
.thanks__center h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3rem, 13vw, 10rem);
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--ink);
}
.thanks__center > p {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--ink-soft);
  margin-top: 8px;
}
.thanks__cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; }

.thanks__footer {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  bottom: 40px;
}
.thanks__footer strong { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; display: block; margin-bottom: 10px; }
.thanks__footer ul { list-style: none; display: grid; gap: 8px; }
.thanks__footer li { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--ink-soft); }
.thanks__footer .ic { width: 26px; height: 26px; }
.thanks__footer .ic::before { -webkit-mask-size: 13px; mask-size: 13px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .about__inner { grid-template-columns: 1fr 1fr; }
  .about__photo { grid-column: 1 / -1; max-width: 320px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card__thumb { min-height: 200px; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    background: rgba(10,36,23,.96);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
  }
  .nav__links.open { transform: none; }
  .nav__links a { color: #fff; font-size: 1.2rem; }
  .nav.scrolled .nav__links a { color: #fff; }
  .nav__burger { display: flex; }

  .about__inner { grid-template-columns: 1fr; }
  .about__photo { max-width: 280px; margin: 0 auto; }
  .divider { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .thanks__footer { position: static; margin-top: 60px; text-align: center; }
  .thanks__footer ul { justify-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
