/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
  --blue: #2789c4;
  --blue-dark: #1f6fa3;
  --blue-deeper: #165a85;
  --yellow: #e7ec84;
  --yellow-dark: #dde566;
  --navy-text: #173a52;
  --card-text: #1c1c1c;
  --pink: #c0264e;
  --pink-hover: #a31e42;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
  --radius: 14px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #222;
  background: var(--white);
  overflow-x: hidden;
}

.display {
  font-family: 'Archivo Black', sans-serif;
}

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

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

section {
  padding: 80px max(60px, 10vw);
}

/* ===========================
   SCROLL REVEAL ANIMATIONS
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--transition), transform .7s var(--transition);
}

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

/* Stagger children */
.card-row .reveal:nth-child(2),
.proj-grid .reveal:nth-child(2),
.people-grid .reveal:nth-child(2),
.connect-grid .reveal:nth-child(2) {
  transition-delay: .12s;
}
.card-row .reveal:nth-child(3),
.proj-grid .reveal:nth-child(3),
.people-grid .reveal:nth-child(3),
.connect-grid .reveal:nth-child(3) {
  transition-delay: .24s;
}
.proj-grid .reveal:nth-child(4),
.connect-grid .reveal:nth-child(4) {
  transition-delay: .36s;
}
.proj-grid .reveal:nth-child(5) {
  transition-delay: .48s;
}
.proj-grid .reveal:nth-child(6) {
  transition-delay: .6s;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 60px;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(39, 137, 196, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 60px;
}

.nav-logo {
  font-size: 1.6rem;
  color: var(--yellow);
  letter-spacing: 2px;
  transition: transform var(--transition);
}



.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  color: var(--white);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .5px;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--yellow);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ===========================
   HERO
   =========================== */
.hero {
  background: var(--blue);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-photo {
  position: absolute;
  left: 0;
  bottom: 0;
  top: 0;
  width: 100%;
  background: url('images/hero-bg.png') center/cover no-repeat;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(39,137,196,0) 0%, rgba(31,111,163,0.6) 50%, var(--blue-dark) 100%);
}

.hero-content {
  margin-left: auto;
  margin-right: max(60px, 10vw);
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 5.2rem;
  line-height: 1.05;
  color: var(--yellow);
  text-align: right;
}

.hero-line {
  display: block;
}

.hero-line .outline {
  -webkit-text-stroke: 2px var(--yellow);
  color: transparent;
  transition: color .4s ease;
}



.hero-subtitle {
  color: var(--white);
  text-align: right;
  margin-top: 20px;
  font-size: 1.15rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
  color: var(--yellow);
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* Hero particles */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(231, 236, 132, .15);
  animation: drift linear infinite;
}

@keyframes drift {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* ===========================
   ABOUT
   =========================== */
.about {
  background: var(--blue);
  color: var(--white);
}

.section-title {
  font-family: 'Archivo Black', sans-serif;
  color: var(--yellow);
  font-size: 2.6rem;
  margin-bottom: 40px;
}

.projects .section-title {
  color: var(--blue-dark);
  text-align: center;
  font-size: 3rem;
}

/* ===========================
   CARDS (About)
   =========================== */
.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

.card {
  background: var(--yellow);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--card-text);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}



.card-sky {
  height: 180px;
  background: linear-gradient(to bottom, #cfe9fb 0%, #eaf6fd 55%, #8bb84a 55%, #7aa63f 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-sky::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 24px;
  width: 60px;
  height: 34px;
  background: var(--white);
  border-radius: 40px;
  box-shadow: 20px 6px 0 -4px var(--white);
  opacity: .9;
}

.card-sky.has-img {
  background: #eef6fb;
}

.card-sky.has-img::before {
  display: none;
}

.card-sky.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}



.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card-body {
  padding: 22px 24px 28px;
  flex: 1;
}

.card-body h3 {
  color: var(--blue-dark);
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.card-body p {
  font-size: .95rem;
  line-height: 1.6;
}

/* ===========================
   PROJECTS
   =========================== */
.projects {
  background: var(--yellow);
  color: var(--navy-text);
}

.proj-split {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

.proj-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 480px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-top: 190px;
  padding-bottom: 190px;
  position: relative;
}

.proj-list::-webkit-scrollbar {
  display: none;
}

.proj-item {
  scroll-snap-align: center;
  flex-shrink: 0;
  padding: 15px 20px;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0.5;
}

.proj-item:hover {
  opacity: 0.7;
}

.proj-item.active {
  background: var(--blue);
  color: var(--white);
  transform: translateX(10px);
  box-shadow: var(--shadow-sm);
  opacity: 1;
  padding: 25px 30px;
  gap: 25px;
}

.proj-item .proj-num {
  font-size: 1.1rem;
  color: var(--navy-text);
  transition: all 0.4s ease;
}

.proj-item.active .proj-num {
  font-size: 1.6rem;
  color: var(--yellow);
}

.proj-item h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  transition: all 0.4s ease;
}

.proj-item.active h4 {
  font-size: 1.25rem;
  font-weight: 700;
}

.proj-preview {
  flex: 1.2;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
}

.proj-mobile-carousel {
  display: none;
}

.preview-img-container {
  width: 100%;
  height: 300px;
  background: #f0f0f0;
  overflow: hidden;
}

.preview-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.preview-img-container img.animate-in {
  animation: fadeZoomIn 0.4s ease forwards;
}

@keyframes fadeZoomIn {
  0% { opacity: 0; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.preview-content {
  padding: 30px;
  background: var(--white);
  color: var(--navy-text);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.preview-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.preview-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: #444;
}

.preview-btn {
  margin-top: auto;
  align-self: flex-start;
  background: var(--blue);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.preview-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

/* Mobile Marquee Default Styles */
.skills-mobile-marquee {
  display: none;
  padding: 30px 0 40px 0;
  background: var(--blue);
}
.skills-mobile-marquee .marquee-row {
  display: flex;
  overflow: hidden;
  width: 100%;
  margin-bottom: 24px;
}
.skills-mobile-marquee .marquee-track {
  display: flex;
  gap: 24px;
  padding-right: 24px; 
  width: max-content;
}
.skills-mobile-marquee .tool-bubble {
  position: relative;
  transform: none;
  pointer-events: auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15), inset 0 0 0 2px rgba(255,255,255,0.5);
  flex-shrink: 0;
}
@keyframes scrollLeftAnim {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes scrollRightAnim {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@media (max-width: 900px) {
  .proj-split {
    display: none;
  }
  
  .proj-mobile-carousel {
    display: block;
    width: 100%;
    margin-top: 20px;
  }
  
  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--blue-dark);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    animation: bounceRight 2s infinite;
  }
  
  @keyframes bounceRight {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(5px); }
  }
  
  .carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 24px;
    padding-bottom: 30px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-left: max(24px, calc(50vw - 160px));
    padding-right: max(24px, calc(50vw - 160px));
  }
  
  .carousel-track::-webkit-scrollbar {
    display: none;
  }
  
  .carousel-card {
    min-width: 320px;
    max-width: 320px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
  }
  
  .carousel-card .card-img {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
  }
  
  .carousel-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .carousel-card .card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  
  .carousel-card h3 {
    font-size: 1.3rem;
    color: var(--blue-dark);
    margin-bottom: 12px;
    font-weight: 700;
  }
  
  .carousel-card p {
    font-size: 0.95rem;
    color: var(--navy-text);
    margin-bottom: 24px;
    line-height: 1.6;
    flex: 1;
  }
  
  .carousel-card .preview-btn {
    align-self: flex-start;
    margin-top: auto;
  }
  
  .skill-split .right {
    display: none;
  }
  .skills-mobile-marquee {
    display: block;
  }
  .track-left {
    animation: scrollLeftAnim 15s linear infinite;
  }
  .track-right {
    animation: scrollRightAnim 15s linear infinite;
  }
}

/* ===========================
   SKILLS
   =========================== */
.skills-top {
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.skills-top .txt {
  flex: 1;
  min-width: 260px;
}

.skills-top h2 {
  font-family: 'Archivo Black', sans-serif;
  color: var(--yellow);
  font-size: 3rem;
  margin-bottom: 14px;
}

.skills-top p {
  font-size: 1.05rem;
  line-height: 1.6;
}

.skills-top img {
  width: 280px;
  max-width: 100%;
  border-radius: 8px;
  filter: grayscale(1) contrast(1.05);
  transition: filter .5s ease, transform var(--transition);
}

.skills-top img:hover {
  filter: grayscale(0) contrast(1.05);
}
/* Skill split */
.skill-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 340px;
}

.skill-split .left {
  background: var(--yellow);
  padding: 60px max(60px, 10vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.skill-split .left h3 {
  font-family: 'Archivo Black', sans-serif;
  color: var(--blue-dark);
  font-size: 2.2rem;
  margin-bottom: 22px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 8px 20px;
  background: var(--blue);
  color: var(--white);
  border-radius: 30px;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .3px;
  transition: background var(--transition), transform var(--transition);
  cursor: default;
}



.skill-split .right {
  background: radial-gradient(circle at 50% 30%, var(--blue) 0%, var(--blue-deeper) 100%);
  position: relative;
  overflow: hidden;
  cursor: grab;
}

.skill-split .right:active {
  cursor: grabbing;
}

.tool-bubble {
  position: absolute;
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2), inset 0 0 0 4px rgba(255,255,255,0.5);
  backdrop-filter: blur(5px);
  user-select: none;
  pointer-events: none; /* Let Matter.js canvas handle events */
  z-index: 10;
  transform: translate(-500px, -500px); /* Hide until positioned */
}

.tool-bubble img {
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.skill-split .right canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}



/* Way of skill */
.way-of-skill {
  background: var(--blue);
  text-align: center;
  padding: 70px max(60px, 10vw);
}

.way-of-skill h3 {
  font-family: 'Archivo Black', sans-serif;
  color: var(--yellow);
  font-size: 2rem;
  margin-bottom: 40px;
}

.people-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.person-card {
  background: var(--yellow-dark);
  border-radius: 10px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}



.person-photo {
  height: 150px;
  background: linear-gradient(to bottom, #cfe9fb 0%, #eaf6fd 55%, #8bb84a 55%, #7aa63f 100%);
  overflow: hidden;
}

.person-photo.has-img {
  background: #eef6fb;
}

.person-photo.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}



.person-info {
  background: var(--blue-dark);
  padding: 18px 20px 24px;
  color: var(--white);
  text-align: left;
}

.person-info h4 {
  color: var(--yellow);
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.person-info span {
  display: block;
  font-size: .85rem;
  color: #dceefb;
  line-height: 1.4;
}

.person-info .date {
  color: var(--yellow);
  font-weight: 700;
  margin-top: 10px;
  font-size: .85rem;
}

/* ===========================
   THANK YOU / CONTACT
   =========================== */
.thankyou {
  background: var(--blue);
  text-align: center;
  color: var(--white);
}

.thankyou h2 {
  font-family: 'Archivo Black', sans-serif;
  color: var(--yellow);
  font-size: 3.4rem;
}

.thankyou .sub {
  font-size: 1.4rem;
  color: var(--yellow);
  margin-top: 6px;
  margin-bottom: 50px;
  font-weight: 400;
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.connect-card {
  background: var(--yellow);
  border-radius: var(--radius);
  padding: 36px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}



.connect-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  transition: background var(--transition), transform var(--transition);
}



.connect-card.outline .icon {
  background: transparent;
  border: 2px solid var(--pink);
}

.connect-card span {
  color: var(--pink);
  font-weight: 600;
}

.icon svg {
  width: 26px;
  height: 26px;
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--blue-deeper);
  color: #bcd8ea;
  text-align: center;
  padding: 22px;
  font-size: .85rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  section {
    padding: 50px 24px;
  }

  .navbar {
    padding: 14px 24px;
  }
  .navbar.scrolled {
    padding: 10px 24px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(22, 90, 133, .97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transition: right var(--transition);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  /* Hero */
  .hero {
    flex-direction: column;
  }
  .hero-photo {
    position: relative;
    width: 100%;
    height: 300px;
  }
  .hero-photo::after {
    background: linear-gradient(0deg, var(--blue) 5%, rgba(39,137,196,0) 100%);
  }
  .hero-content {
    margin-left: 0;
    padding: 30px 24px;
  }
  .hero-title {
    font-size: 2.6rem;
    text-align: left;
  }
  .hero-subtitle {
    text-align: left;
  }
  .hero-cta {
    justify-content: flex-start;
  }

  /* Cards */
  .card-row {
    grid-template-columns: 1fr;
  }

  /* Projects now handled by .proj-mobile-carousel in the 900px query */
  /* Skills */
  .skill-split {
    grid-template-columns: 1fr;
  }
  .skill-split .left {
    padding: 36px 24px;
  }
  .skill-split .right {
    display: none;
  }

  .way-of-skill {
    padding: 50px 24px;
  }

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

  /* Contact */
  .connect-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .projects .section-title {
    font-size: 2.2rem;
  }
  .skills-top h2 {
    font-size: 2.2rem;
  }
  .thankyou h2 {
    font-size: 2.4rem;
  }
}
