
/* =========================
   1. RESET & WARNA
========================= */
:root {
  --bg: #080B12;
  --surface: #101722;
  --surface-light: #141E2B;
  --cyan: #00D9FF;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --border: #243344;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: -250px;
  right: -180px;
  width: 500px;
  height: 500px;
  background: var(--cyan);
  opacity: 0.045;
  filter: blur(130px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::selection {
  background: var(--cyan);
  color: var(--bg);
}

.section {
  width: min(1120px, 90%);
  margin-inline: auto;
  padding: 110px 0;
}

/* =========================
   2. NAVBAR
========================= */
.navbar {
  width: 100%;
  min-height: 76px;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: rgba(8, 11, 18, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo span {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.25s;
}

.nav-links a:hover {
  color: var(--cyan);
}

.nav-links .nav-contact {
  color: var(--cyan);
  border: 1px solid rgba(0, 217, 255, 0.45);
  padding: 9px 16px;
  border-radius: 8px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: var(--cyan);
}


/* =========================
   3. HERO
========================= */
.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  position: relative;
}

.hero-content {
  animation: fadeUp 0.8s ease both;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39E58C;
  margin-right: 7px;
  box-shadow: 0 0 12px rgba(57, 229, 140, 0.5);
}

.hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -3px;
  margin-bottom: 25px;
}

.gradient-text {
  color: var(--cyan);
  background: linear-gradient(100deg, #00D9FF, #8CEEFF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description,
.section-description {
  color: var(--muted);
  max-width: 520px;
  font-size: 1rem;
}

.typing-line {
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 0.92rem;
  margin-top: 24px;
  min-height: 30px;
}

.terminal-symbol {
  color: #39E58C;
}

.cursor {
  animation: blink 0.8s step-end infinite;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 21px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.25s, box-shadow 0.25s,
    background 0.25s;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--cyan);
  color: #061018;
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.13);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.28);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--cyan);
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #64748B;
  font-size: 0.67rem;
  letter-spacing: 1px;
  margin-top: 42px;
}

.social-divider {
  width: 28px;
  height: 1px;
  background: var(--border);
}

/* =========================
   4. CODE CARD
========================= */
.code-card {
  background: #0D141E;
  border: 1px solid #253647;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28),
    0 0 35px rgba(0, 217, 255, 0.04);
  animation: float 5s ease-in-out infinite;
}

.code-header,
.code-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #111B27;
}

.code-header {
  border-bottom: 1px solid #253647;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span,
.mini-dots {
  font-size: 0.65rem;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #FF626D;
}

.window-dots span:nth-child(2) {
  background: #F5C451;
}

.window-dots span:nth-child(3) {
  background: #39E58C;
}

.file-label,
.code-menu {
  color: var(--muted);
  font-size: 0.8rem;
}

.code-body {
  padding: 26px 15px;
  overflow-x: auto;
  font: 0.84rem/2.2 Consolas, monospace;
}

.code-body p {
  white-space: pre;
}

.line-number {
  display: inline-block;
  width: 32px;
  padding-right: 10px;
  text-align: right;
  color: #536579;
  user-select: none;
}

.code-purple {
  color: #C792EA;
}

.code-green {
  color: #A5E6A1;
}

.code-footer {
  color: var(--muted);
  font-size: 0.72rem;
  border-top: 1px solid #253647;
}

.code-footer .status-dot {
  width: 6px;
  height: 6px;
}

.scroll-indicator {
  position: absolute;
  bottom: 25px;
  left: 0;
  color: #64748B;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
}

.scroll-indicator span {
  color: var(--cyan);
  margin-left: 8px;
}

/* =========================
   5. JUDUL SECTION
========================= */
.section-heading {
  margin-bottom: 45px;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -1.5px;
  line-height: 1.25;
  margin-bottom: 15px;
}

.section-heading .eyebrow {
  margin-bottom: 13px;
}

/* =========================
   6. ABOUT
========================= */
.about-section {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s;
}

.about-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 217, 255, 0.6);
}

.about-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: rgba(0, 217, 255, 0.08);
  color: var(--cyan);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.about-card h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.about-card p,
.project-info p {
  color: var(--muted);
  font-size: 0.88rem;
}

/* =========================
   7. SKILLS
========================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 23px;
  transition: transform 0.25s, border-color 0.25s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

.skill-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 800;
}

.html-icon {
  background: rgba(255, 115, 65, 0.12);
  color: #FF875B;
}

.css-icon {
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
}

.js-icon {
  background: rgba(250, 204, 21, 0.12);
  color: #FACC15;
  font-size: 1rem;
}

.cpp-icon {
  background: rgba(129, 140, 248, 0.12);
  color: #A5B4FC;
}

.skill-card h3 {
  font-size: 1rem;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 3px 0 8px;
}

.skill-status {
  color: var(--cyan);
  font-size: 0.62rem;
  letter-spacing: 1px;
}

/* =========================
   8. PROJECTS
========================= */
.projects-section {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s,
    box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(0, 217, 255, 0.55);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.project-preview {
  height: 210px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.preview-one {
  background: linear-gradient(140deg, #112A3B, #101722);
}

.preview-two {
  background: linear-gradient(140deg, #1A2341, #101722);
}

.preview-three {
  background: linear-gradient(140deg, #153B43, #101722);
}

.preview-number {
  position: absolute;
  bottom: 12px;
  left: 15px;
  color: #8CA1B5;
  font-size: 0.62rem;
  letter-spacing: 1px;
}

.mini-browser {
  width: 75%;
  min-height: 140px;
  padding: 13px;
  background: #0B111B;
  border: 1px solid #314456;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.mini-dots {
  color: #00D9FF;
  margin-bottom: 12px;
}

.mini-title {
  color: var(--muted);
  font-size: 0.58rem;
}

.mini-heading {
  color: var(--cyan);
  font-weight: 800;
  font-size: 1rem;
  margin: 6px 0;
}

.mini-line {
  width: 90%;
  height: 4px;
  background: #344458;
  border-radius: 5px;
  margin: 7px 0;
}

.mini-line.short {
  width: 55%;
}

.mini-button {
  width: 45px;
  height: 12px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--cyan);
}

.mini-calculator {
  width: 65%;
  padding: 17px;
  background: #0B111B;
  border: 1px solid #344458;
  border-radius: 10px;
}

.mini-calculator > span {
  display: block;
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 2px;
}

.mini-calculator strong {
  display: block;
  padding: 12px 0;
  color: var(--cyan);
  font-size: 1rem;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.calc-buttons i {
  display: grid;
  place-items: center;
  height: 19px;
  background: #182638;
  color: #C8D8E8;
  border-radius: 3px;
  font-size: 0.55rem;
  font-style: normal;
}

.design-preview {
  width: 76%;
  min-height: 145px;
  padding: 18px;
  background: #0B111B;
  border: 1px solid #35515A;
  border-radius: 8px;
}

.design-preview > span {
  color: var(--cyan);
  font-size: 0.58rem;
  letter-spacing: 2px;
}

.design-preview strong {
  display: block;
  margin-top: 10px;
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.design-shapes {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.design-shapes i {
  display: block;
  width: 23px;
  height: 5px;
  background: var(--cyan);
  border-radius: 5px;
}

.design-shapes i:nth-child(2) {
  opacity: 0.5;
}

.design-shapes i:nth-child(3) {
  opacity: 0.2;
}

.project-info {
  padding: 22px;
}

.project-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-tags span {
  padding: 4px 8px;
  border: 1px solid #2C4355;
  border-radius: 5px;
  color: var(--cyan);
  font-size: 0.62rem;
  letter-spacing: 0.5px;
}

.project-info h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.project-info p {
  min-height: 70px;
}

.project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 17px;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.project-link span {
  font-size: 1rem;
}

.projects-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* =========================
   9. CONTACT & FOOTER
========================= */
.contact-section {
  padding-top: 70px;
}

.contact-card {
  text-align: center;
  padding: 65px 25px;
  border: 1px solid #294151;
  border-radius: 18px;
  background: radial-gradient(
    ellipse at top,
    rgba(0, 217, 255, 0.08),
    transparent 65%
  ), var(--surface);
}

.contact-card .eyebrow {
  margin-bottom: 18px;
}

.contact-card > p:not(.eyebrow) {
  max-width: 520px;
  margin: 0 auto 25px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-card .contact-note {
  margin: 13px auto 0 !important;
  font-size: 0.72rem !important;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 28px 5%;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer .logo {
  color: var(--text);
  font-size: 1.2rem;
}

/* =========================
   10. ANIMASI
========================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Konten tampil secara default */
.reveal {
  opacity: 1;
  transform: none;
}

/* Animasi hanya aktif jika JavaScript berhasil dijalankan */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-reveal .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   11. RESPONSIVE
========================= */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 80px;
    padding-bottom: 110px;
  }

  .hero-content {
    max-width: 650px;
  }

  .code-card {
    max-width: 600px;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .section {
    width: 88%;
    padding: 75px 0;
  }

  .navbar {
    min-height: 68px;
    padding: 0 6%;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    padding: 20px 6% 25px;
    background: #0C121C;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .nav-links .nav-contact {
    text-align: center;
    margin-top: 5px;
  }

  .hero {
    min-height: auto;
    padding-top: 75px;
    gap: 35px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    letter-spacing: -2px;
  }

  .hero-description {
    font-size: 0.92rem;
  }

  .hero-social {
    flex-wrap: wrap;
    font-size: 0.58rem;
    margin-top: 30px;
  }

  .scroll-indicator {
    bottom: 25px;
  }

  .about-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card:last-child {
    grid-column: auto;
  }

  .section-heading h2,
  .contact-card h2 {
    font-size: 2rem;
  }

  .about-card {
    padding: 23px;
  }

  .skill-card {
    padding: 18px;
  }

  .contact-card {
    padding: 45px 20px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Hormati pengaturan pengurangan animasi */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
