/* ========================================
   PORTFOLIO — Muhammad Mas Adji Firmansyah
   Modern Dark Theme | Vanilla CSS
   ======================================== */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  /* Colors */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #1E293B;
  --bg-elevated: #263348;

  --primary: #8B5CF6;
  --primary-light: #A78BFA;
  --cyan: #06B6D4;
  --blue: #3B82F6;

  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #3B82F6 100%);
  --gradient-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.15));

  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(139, 92, 246, 0.3);

  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --container-padding-inline: 24px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.75rem;
  --font-size-5xl: 3.5rem;

  --line-height: 1.7;
  --line-height-heading: 1.2;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 50px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- TYPOGRAPHY ---------- */
a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-padding-inline);
}

/* ---------- GRADIENT TEXT ---------- */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- SECTION ---------- */
.section {
  padding: var(--section-padding);
  position: relative;
  scroll-margin-top: 72px;
}

.section__header {
  text-align: center;
  margin-bottom: 60px;
}

.section__badge {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  background: rgba(139, 92, 246, 0.1);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.section__title {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: var(--line-height-heading);
  margin-bottom: 12px;
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---------- ABOUT INTRO CARD (profile + text side by side) ---------- */
.about__intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 0;
  transition: border-color var(--transition-base);
}

.about__intro-card:hover {
  border-color: var(--border-hover);
}

.about__intro {
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.about__profile {
  flex-shrink: 0;
  position: relative;
  width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-primary);
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.about__intro-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about__intro-text p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: var(--line-height);
}

.about__intro-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .about__intro {
    flex-direction: column;
    text-align: center;
  }

  .about__profile {
    width: 180px;
    margin: 0 auto;
  }
}

/* ---------- ABOUT CONTENT ---------- */
.about__content {
  max-width: 900px;
  margin: 0 auto;
}

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

.about__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    padding: 24px;
    text-align: center;

    transition: all var(--transition-base);
}

/* ==============================
   BUTTONS
   ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 52px;
  padding: 0 24px;

  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;

  border-radius: 14px;

  transition: all 0.3s ease;

  white-space: nowrap;
  text-decoration: none;

  cursor: pointer;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn--outline:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}

.btn--primary svg,
.btn--outline svg {
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.btn--primary:hover svg {
  transform: translateY(2px);
}

.btn--outline:hover svg {
  transform: translateX(4px);
}

/* ---------- TAGS ---------- */
.tag {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.15);
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.3);
}

/* ---------- TECH BADGE ---------- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.tech-badge:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}

/* ==============================
   REVEAL ANIMATION
   ============================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ==============================
   NAVBAR
   ============================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 0;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar__logo-text {
  font-size: var(--font-size-xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition-fast);
  padding: 4px 0;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
  border-radius: 2px;
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--text-primary);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

/* Hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}

.navbar__toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==============================
   HERO
   ============================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;

  padding-top: 80px;
  padding-bottom: 100px; /* tambahkan */

  position: relative;
  overflow: hidden;
}

.hero__bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
  pointer-events: none;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #4ADE80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  position: relative;
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hero__title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero__role {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 32px;
}

.hero__cursor {
  display: inline-block;
  color: var(--primary);
  animation: blink 0.8s step-end infinite;
  font-weight: 300;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero__description {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  line-height: var(--line-height);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__code-window {
  width: 100%;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-slow);
}

.hero__code-window:hover {
  transform: translateY(-4px);
}

.hero__code-header {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero__dot--red {
  background: #FF5F56;
}

.hero__dot--yellow {
  background: #FFBD2E;
}

.hero__dot--green {
  background: #27C93F;
}

.hero__code-body {
  padding: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.hero__code-body::-webkit-scrollbar {
  height: 6px;
}

.hero__code-body::-webkit-scrollbar-track {
  background: transparent;
}

.hero__code-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.hero__code-body pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: var(--font-size-sm);
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
  tab-size: 4;
  margin: 0;
  overflow-x: auto;
}

.hero__code-body {
  text-align: left;
}

.hero__code-body pre,
.hero__code-body code {
  text-align: left;
  display: block;
}

.hero__code-body code {
  display: block;
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
}

.hero__code-keyword {
  color: #FF79C6;
}

.hero__code-class {
  color: #8BE9FD;
}

.hero__code-fn {
  color: #50FA7B;
}

.hero__code-self {
  color: #FFB86C;
}

.hero__code-prop {
  color: #8BE9FD;
}

.hero__code-string {
  color: #F1FA8C;
}

/* ==============================
   ABOUT
   ============================== */
.about__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.about__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition-base);
}

.about__card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.1);
}

.about__card-icon {
    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.about__card:hover .about__card-icon {
  background: rgba(139, 92, 246, 0.18);
  transform: scale(1.1);
}

.about__card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 6px;
}

.about__card-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.about__text {
  max-width: 800px;
  margin: 0 auto;
}

.about__text p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: var(--line-height);
}

.about__text p:last-child {
  margin-bottom: 0;
}

/* ==============================
   EXPERIENCE / TIMELINE
   ============================== */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--cyan), var(--blue));
}

.timeline__item {
  position: relative;
  padding-bottom: 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--primary);
  z-index: 2;
}

.timeline__connector {
  display: none;
}

.timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
}

.timeline__card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.08);
}

.timeline__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline__period {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--cyan);
}

.timeline__tag {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline__role {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline__company {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.timeline__list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.timeline__list li {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.8;
}

.timeline__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ========================================
   EDUCATION TIMELINE
   ======================================== */

.timeline__education-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

/* ---------- Logo ---------- */
.timeline__education-logo {
  flex-shrink: 0;

  width: 90px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px;

  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);

  overflow: hidden;
}

.timeline__education-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ---------- Info ---------- */
.timeline__education-info {
  flex: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Hapus semua margin bawaan */
.timeline__education-info>* {
  margin: 0 !important;
}

/* ---------- Meta ---------- */
.timeline__education-info .timeline__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  margin: 0 !important;
}

.timeline__education-info .timeline__period {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--cyan);
}

.timeline__education-info .timeline__tag {
  font-size: var(--font-size-xs);
  font-weight: 500;

  padding: 3px 10px;

  color: var(--primary);
  background: rgba(139, 92, 246, 0.1);

  border-radius: var(--radius-full);

  margin: 0 !important;
}

/* ---------- School ---------- */
.timeline__education-info .timeline__role {
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: 1.25;

  margin: 0 !important;
}

/* ---------- Major ---------- */
.timeline__education-info .timeline__company {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;

  margin: 0 !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .timeline__education-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .timeline__education-logo {
    width: 80px;
    height: 80px;
  }

  .timeline__education-info .timeline__meta {
    justify-content: center;
  }
}

/* ==============================
   TECH STACK
   ============================== */
.techstack__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.techstack__category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition-base);
}

.techstack__category:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.08);
}

.techstack__category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.techstack__category-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

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

/* ==============================
   PROJECT CARD HORIZONTAL
   ============================== */

.project-card {
  display: flex;
  align-items: stretch;
  gap: 24px;

  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);

  padding: 24px;

  transition: all var(--transition-base);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.1);
}

/* ---------- IMAGE ---------- */

/* ---------- IMAGE ---------- */

.project-card__image {
  flex-shrink: 0;

  width: 340px;
  height: 220px;

  overflow: hidden;
  border-radius: var(--radius-md);

  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- CONTENT ---------- */

.project-card__content {
  flex: 1;
  min-width: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.project-card__title {
  margin: 0;

  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: 1.3;
}

.project-card__desc {
  margin: 0;

  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.8;
}

/* ---------- TECH STACK ---------- */

.project-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* Laptop */
@media (max-width: 1200px) {
  .project-card__image {
    width: 300px;
    height: 200px;
  }
}

/* Tablet */
@media (max-width: 992px) {
  .project-card__image {
    width: 260px;
    height: 180px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .project-card {
    flex-direction: column;
  }

  .project-card__image {
    width: 100%;
    height: 220px;
  }

  .project-card__content {
    gap: 10px;
  }
}

/* ==============================
   SKILLS
   ============================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skills__group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}

.skills__group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.skills__group-title svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.skill-bar {
  margin-bottom: 20px;
}

.skill-bar:last-child {
  margin-bottom: 0;
}

.skill-bar__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.skill-bar__label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.skill-bar__value {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.skill-bar__track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.skill-bar__fill {
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ==============================
   CONTACT
   ============================== */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.contact__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  transition: all var(--transition-base);
  display: block;
}

.contact__card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.1);
}

.contact__card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-md);
  margin: 0 auto 16px;
  color: var(--primary);
  transition: all var(--transition-base);
}

.contact__card:hover .contact__card-icon {
  background: rgba(139, 92, 246, 0.18);
  transform: scale(1.1) rotate(-4deg);
}

.contact__card-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin-bottom: 6px;
}

.contact__card-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  word-break: break-all;
}

/* ==============================
   FOOTER
   ============================== */
.footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__tagline {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: 4px;
}

.footer__socials {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
}

.footer__social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.footer__divider {
  height: 1px;
  background: var(--border-color);
  margin-bottom: 24px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copyright,
.footer__credit {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.footer__heart {
  color: #EF4444;
}

/* ==============================
   SCROLL TO TOP
   ============================== */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
  cursor: pointer;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* ==============================
   RESPONSIVE
   ============================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --font-size-5xl: 2.75rem;
    --font-size-4xl: 2.25rem;
    --font-size-3xl: 1.75rem;
  }

  .hero__container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__content {
    text-align: center;
  }

  .hero__visual {
    max-width: 520px;
    margin: 0 auto;
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .hero__code-body pre {
    font-size: var(--font-size-xs);
    line-height: 1.6;
  }

  .hero__code-body {
    padding: 14px;
  }

  .about__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .techstack__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-xl: 1.125rem;
    --font-size-lg: 1rem;
    --section-padding: 64px 0;
    --container-padding-inline: 20px;
  }

  .navbar__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 32px 40px;
    gap: 24px;
    transition: right var(--transition-base);
    z-index: 1000;
  }

  .navbar__menu.open {
    right: 0;
  }

  .navbar__link {
    font-size: var(--font-size-lg);
  }

  .navbar__toggle {
    display: flex;
  }

  /* Mobile overlay */
  .navbar__menu.open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

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

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

  .timeline {
    padding-left: 32px;
  }

  .timeline__dot {
    left: -26px;
    width: 12px;
    height: 12px;
  }

  .footer__top,
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  :root {
    --container-padding-inline: 16px;
    --section-padding: 48px 0;
  }

  .hero__container {
    gap: 32px;
  }

  .hero__code-body {
    padding: 12px;
  }

  .hero__code-body pre {
    font-size: 0.6875rem;
    line-height: 1.5;
  }

  .hero__code-header {
    padding: 10px 12px;
  }

  .hero__dot {
    width: 10px;
    height: 10px;
  }

  .section__header {
    margin-bottom: 40px;
  }
}

/* Small Mobile (412px) */
@media (max-width: 412px) {
  .hero__code-body {
    padding: 10px;
  }

  .hero__code-body pre {
    font-size: 0.625rem;
    line-height: 1.5;
  }
}

/* Extra Small Mobile (375px) */
@media (max-width: 375px) {
  .hero__code-body {
    padding: 8px;
  }

  .hero__code-body pre {
    font-size: 0.5625rem;
    line-height: 1.4;
  }
}

/* Minimum (360px and below) — monospace compressed */
@media (max-width: 360px) {
  .hero__code-body pre {
    font-family: 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.5rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
  }

  .hero__code-body {
    padding: 8px;
  }

  .hero__code-header {
    padding: 8px 10px;
  }

  .hero__dot {
    width: 8px;
    height: 8px;
    gap: 6px;
  }
}

.hero__code-header {
  padding: 10px 14px;
}

.section__header {
  margin-bottom: 40px;
}


/* ==============================
   ACCESSIBILITY
   ============================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .skill-bar__fill {
    transition: none;
  }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}