/* ==========================================================================
   1. COLOR VARIABLES & BASE STYLES
   ========================================================================== */
:root {
  --color-dark: #101011;
  --color-secondary: #605B51;
  --color-light: #E8EDF2;
  --color-border: rgba(232, 237, 242, 0.15);
  --color-card-bg: rgba(232, 237, 242, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  background-color: var(--color-dark);
  color: var(--color-light);
  line-height: 1.6;
}

/* ==========================================================================
   2. NAVBAR
   ========================================================================== */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 25px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  opacity: 0;
  transform: translateX(120px);
  animation: navEnter 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.3s;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--color-light);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--color-light);
  font-size: 0.85rem;
  letter-spacing: 2px;
  transition: 0.35s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: var(--color-secondary);
  transition: 0.35s ease;
}

.nav-links a:hover {
  color: var(--color-light);
  transform: translateY(-2px);
}

.nav-links a:hover::after {
  width: 100%;
}

@keyframes navEnter {
  from {
    opacity: 0;
    transform: translateX(120px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   3. CURTAIN / INTRO ANIMATION
   ========================================================================== */
.intro-slide {
  position: fixed;
  width: 100%;
  height: 50vh;
  left: 0;
  background: var(--color-light);
  z-index: 999;
  transition: transform 1.3s cubic-bezier(0.77, 0, 0.175, 1);
}

.intro-slide.top {
  top: 0;
}

.intro-slide.bottom {
  bottom: 0;
}

.intro-slide.top.open {
  transform: translateY(-100%);
}

.intro-slide.bottom.open {
  transform: translateY(100%);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  background: var(--color-dark);
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.text-wrapper {
  width: 50%;
  text-align: left;
  position: relative;
  z-index: 5;
}

#hero-text {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--color-light);
}

#hero-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

#hero-text .accent {
  color: var(--color-secondary);
}

.text-wrapper p {
  margin-top: 20px;
  max-width: 450px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-light);
  opacity: 0.8;
}

.button {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-light);
  background: var(--color-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease, background 0.3s ease;
}

.button.show {
  opacity: 1;
  transform: translateY(0);
}

.button:hover {
  transform: scale(1.03);
  background: #4e4a42;
}

.hero-image {
  width: clamp(260px, 35vw, 420px);
  aspect-ratio: 1 / 1;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(-80px);
  animation: heroImageEnter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.5s;
}

.hero-circle {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-dark));
  border-radius: 60% 40% 55% 45%;
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 60% 40% 55% 45%;
  filter: contrast(1.05);
  animation: imageScale 1.2s ease forwards;
}

/* ==========================================================================
   5. SKILL SECTION
   ========================================================================== */
.skill-section {
  min-height: 100vh;
  padding: 100px 7%;
  display: flex;
  align-items: center;
  background: var(--color-dark);
}

.skill-container {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.skill-content {
  max-width: 650px;
}

.skill-content h1 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--color-light);
}

.skill-content p {
  color: var(--color-light);
  opacity: 0.8;
  font-size: 1rem;
  max-width: 550px;
  margin-bottom: 40px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-box {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  padding: 16px 20px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-60px);
  transition: 0.8s ease;
}

.skill-box.show {
  opacity: 1;
  transform: translateY(0);
}

.skill-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skill-title h3 {
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--color-light);
}

.skill-title span {
  font-size: 0.9rem;
  color: var(--color-light);
  font-weight: bold;
}

.skill-line {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-light));
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.skill-image {
  width: 100%;
  height: 450px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.skill-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease;
  transform: scale(1.05);
}

.skill-image img.active {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   6. ABOUT SECTION & INFOGRAPHIC GRID
   ========================================================================== */
.about-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 100px 7%;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.85)
    ),
    url("IMG_0126.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.about-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.about-header {
  max-width: 700px;
  margin-bottom: 50px;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-secondary);
  display: block;
  margin-bottom: 15px;
  font-weight: 600;
}

.about-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--color-light);
}

.about-header p {
  font-size: 1.05rem;
  color: var(--color-light);
  opacity: 0.9;
  max-width: 600px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.info-card.show {
  opacity: 1;
  transform: translateY(0);
}

.info-card:nth-child(1) { transition-delay: 0.1s; }
.info-card:nth-child(2) { transition-delay: 0.25s; }
.info-card:nth-child(3) { transition-delay: 0.4s; }

.info-card:hover {
  transform: translateY(-8px);
  background: rgba(232, 237, 242, 0.1);
}

.number {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}

.info-card h2 {
  font-size: 1.35rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
  color: var(--color-light);
}

.info-card p {
  color: var(--color-light);
  opacity: 0.8;
  font-size: 0.95rem;
}

/* ==========================================================================
   7. CAREER / TIMELINE SECTION
   ========================================================================== */
.career {
  background: var(--color-dark);
  padding: 100px 8% 120px;
  position: relative;
}

.career-header {
  position: sticky;
  top: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-dark);
  z-index: 20;
}

.career-header h1 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  letter-spacing: 4px;
  font-weight: 700;
  text-align: center;
  color: var(--color-light);
}

.timeline {
  position: relative;
  max-width: 850px;
  margin: auto;
  padding-top: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--color-border);
}

.career-item {
  position: relative;
  display: flex;
  gap: 32px;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.career-item.show {
  opacity: 1;
  transform: translateY(0);
}

.circle-area {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.circle:hover {
  transform: scale(1.1);
}

.career-content {
  position: relative;
  width: 100%;
  min-height: 280px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  padding: 32px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transition: background 0.5s ease, color 0.5s ease, transform 0.5s ease;
}

.career-content h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--color-light);
}

.career-content p {
  color: var(--color-light);
  opacity: 0.8;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.career-content ul {
  list-style: none;
}

.career-content li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-light);
  font-size: 0.9rem;
}

.card-default {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-gallery {
  position: absolute;
  inset: 0;
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-gallery img {
  width: 30%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.expand-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 60px;
  border: none;
  border-radius: 30px 0 0 30px;
  background: var(--color-secondary);
  color: var(--color-light);
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
  transition: width 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.expand-btn:hover {
  width: 44px;
}

.career-content.active {
  background: var(--color-light);
  color: var(--color-dark);
}

.career-content.active h2,
.career-content.active p,
.career-content.active li {
  color: var(--color-dark);
}

.career-content.active .card-default {
  opacity: 0;
  transform: translateX(-30px);
}

.career-content.active .card-gallery {
  opacity: 1;
  transform: translateX(0);
}

.career-content.active .expand-btn {
  background: var(--color-dark);
  color: var(--color-light);
}

/* ==========================================================================
   8. PROJECT SECTION
   ========================================================================== */
.project-section {
  background: var(--color-dark);
  padding: 80px 8%;
}

.project-header {
  position: sticky;
  top: 0;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 6;
  background: var(--color-dark);
}

.project-header span {
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--color-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.project-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.1;
  color: var(--color-light);
  transition: transform 1s ease, opacity 0.5s ease;
  transform-origin: left;
}

.project-header.small h1 {
  transform: scale(0.75);
  opacity: 0.8;
}

.project-list {
  max-width: 950px;
  margin: auto;
  padding-top: 40px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card.show {
  opacity: 1;
  transform: translateY(0);
}

.project-image {
  height: 320px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--color-border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-info h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--color-light);
}

.project-info p {
  color: var(--color-light);
  opacity: 0.8;
  font-size: 0.95rem;
}

.tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.tech span {
  padding: 4px 12px;
  border: 1px solid var(--color-secondary);
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--color-light);
}

.project-info a {
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-secondary);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.project-info a:hover {
  color: var(--color-secondary);
}

/* ==========================================================================
   9. CONTACT SECTION
   ========================================================================== */
.contact-section {
  min-height: 100vh;
  padding: 100px 7%;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
}

.contact-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-header {
  max-width: 700px;
  margin-bottom: 50px;
}

.contact-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 16px 0;
  color: var(--color-light);
}

.contact-header p {
  color: var(--color-light);
  opacity: 0.8;
  font-size: 1.05rem;
}

.contact-card {
  width: min(650px, 100%);
  padding: 40px 30px;
  border-radius: 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(80px);
  transition: 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-card.show {
  opacity: 1;
  transform: translateY(0);
}

.contact-profile h2 {
  font-size: 2rem;
  letter-spacing: 3px;
  color: var(--color-light);
}

.contact-profile span {
  color: var(--color-secondary);
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.contact-links a {
  padding: 12px 24px;
  border-radius: 40px;
  border: 1px solid var(--color-border);
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  transition: 0.3s;
}

.contact-links a:hover {
  background: var(--color-light);
  color: var(--color-dark);
  transform: translateY(-3px);
}

.contact-button {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-dark));
  border: 1px solid var(--color-secondary);
  border-radius: 40px;
  color: var(--color-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  transition: 0.4s;
}

.contact-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(96, 91, 81, 0.4);
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.footer {
  padding: 40px 7% 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-dark);
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-brand h2 {
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: var(--color-light);
}

.footer-brand p {
  color: var(--color-secondary);
  margin-top: 6px;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  color: var(--color-light);
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  transition: 0.3s;
}

.footer-nav a:hover {
  opacity: 1;
}

.footer-bottom {
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.footer-bottom p {
  color: var(--color-light);
  opacity: 0.5;
  font-size: 0.75rem;
}

/* ==========================================================================
   11. KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes heroImageEnter {
  from {
    opacity: 0;
    transform: translateY(-80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes imageScale {
  from {
    transform: scale(0.85);
  }
  to {
    transform: scale(1);
  }
}

@keyframes textEnter {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes rotateBlob {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* ==========================================================================
   12. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */
/* Tablet Large & Small Desktop */
@media (max-width: 1024px) {
  .skill-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .skill-image {
    height: 350px;
  }

  .project-card {
    gap: 24px;
  }
}

/* Tablet / Mobile Landscape */
@media (max-width: 900px) {
  .navbar {
    padding: 20px 5%;
  }

  .nav-links {
    gap: 20px;
  }

  .hero {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 32px;
    padding: 100px 5% 50px;
    height: auto;
    min-height: 100vh;
  }

  .text-wrapper {
    width: 100%;
    opacity: 0;
    transform: translateX(-80px);
    animation: textEnter 1s ease forwards;
  }

  .text-wrapper p {
    margin: 16px auto 0;
  }

  .hero-image {
    width: 300px;
    height: 300px;
  }

  .timeline::before {
    left: 19px;
  }

  .career-item {
    gap: 16px;
  }

  .circle-area {
    width: 40px;
    height: 40px;
  }

  .circle {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .career-content {
    padding: 20px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-image {
    height: 260px;
  }

  .card-gallery {
    flex-direction: column;
  }

  .card-gallery img {
    width: 100%;
    height: 100px;
  }
}

/* Mobile Devices */
@media (max-width: 600px) {
  .about-section,
  .skill-section,
  .career,
  .project-section,
  .contact-section {
    padding: 60px 5%;
  }

  .navbar {
    padding: 16px 5%;
  }

  .nav-logo {
    font-size: 1.1rem;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  .hero {
    padding: 100px 5% 40px;
    gap: 24px;
  }

  .hero-image {
    width: 240px;
    height: 240px;
  }

  .about-header,
  .skill-content,
  .contact-header {
    margin-bottom: 32px;
  }

  .career-header {
    height: 60px;
    justify-content: flex-start;
  }

  .career-header h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    text-align: left;
  }

  .project-header {
    height: 60px;
    align-items: center;
    justify-content: center;
  }

  .project-header span {
    display: none;
  }

  .project-header h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    text-align: center;
  }

  .contact-card {
    padding: 24px 16px;
  }

  .contact-profile h2 {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-links a {
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    gap: 12px;
  }

  .footer-brand h2 {
    font-size: 1.3rem;
  }
}