:root {
  --bg: #FAFAFA;
  --bg2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #E5E5E5;
  --border: rgba(0, 0, 0, 0.12);
  --border-hover: rgba(0, 0, 0, 0.25);
  --primary: #111111;
  --primary2: #333333;
  --accent: #555555;
  --accent2: #111111;
  --text: #111111;
  --text-muted: #555555;
  --gradient: linear-gradient(135deg, #111111, #333333);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.02));
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-glow: none;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
  --overlay-bg: rgba(255, 255, 255, 0.9);
  --edu-overlay: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.85) 40%, rgba(255, 255, 255, 0.1) 100%);
  --radius: 16px;
  --transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.05);
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --nav-h: 80px;
}

:root[data-theme="dark"] {
  --bg: #111111;
  --bg2: #1A1A1A;
  --surface: #1A1A1A;
  --surface-hover: #2A2A2A;
  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.25);
  --primary: #FFFFFF;
  --primary2: #DDDDDD;
  --accent: #AAAAAA;
  --accent2: #FFFFFF;
  --text: #FFFFFF;
  --text-muted: #AAAAAA;
  --gradient: linear-gradient(135deg, #FFFFFF, #DDDDDD);
  --gradient-subtle: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(26, 26, 26, 0.85);
  --nav-bg-scrolled: rgba(26, 26, 26, 0.98);
  --overlay-bg: rgba(26, 26, 26, 0.9);
  --edu-overlay: linear-gradient(to top, rgba(26, 26, 26, 1) 0%, rgba(26, 26, 26, 0.85) 40%, rgba(26, 26, 26, 0.1) 100%);
}

body.custom-cursor-active,
body.custom-cursor-active * {
  cursor: none !important;
}

body {
  background-color: var(--bg);
  overflow-x: hidden;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
}

#fluid-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: transparent;
  filter: invert(1) hue-rotate(180deg);
  opacity: 1;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

:root[data-theme="dark"] #fluid-canvas {
  filter: none;
  opacity: 1;
}

#grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.035;
  background-image: url('https://grainy-gradients.vercel.app/noise.svg');
  filter: contrast(120%) brightness(100%);
  mix-blend-mode: overlay;
}

#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease,
    border 0.25s ease,
    opacity 0.2s ease;
}

/* ── Hide the trailing ring by default ── */
#cursor-ring {
  display: none;
}

/* ── Over text/links: dot becomes transparent hollow ring ── */
body.cursor-on-text #cursor-dot {
  width: 14px;
  height: 14px;
  background: transparent;
  border: 1.5px solid var(--text);
}

/* ── Over buttons/cards: dot disappears, large ring appears ── */
body.cursor-hovering #cursor-dot {
  width: 18px;
  height: 18px;
  background: transparent;
  border: 1.5px solid var(--text);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

ul {
  list-style: none;
}

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

/* ============================
   NAVBAR
   ============================ */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9999;
}

.scroll-progress-bar {
  height: 100%;
  background: var(--gradient);
  width: 0%;
}

#navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  height: 64px;
  z-index: 1000;
  transition: var(--transition);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle.floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  transform: translateY(-4px) scale(1.05);
}

#navbar.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  height: 60px;
  top: 10px;
}

.nav-container {
  width: 100%;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center links in the glass capsule */
  gap: 4px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-bracket {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin-right: 16px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 100px;
  /* Capsule shape */
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
}

/* Underline indicator */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover state */
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-link:hover::after {
  width: 60%;
}

/* Active / selected state — liquid glass + full underline */
.nav-link.active {
  color: var(--text);
  background: var(--surface-hover);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.nav-link.active::after {
  width: 70%;
  /* Full underline on active */
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================
   SECTION LAYOUT
   ============================ */
.section {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}

.section-alt {
  background: transparent;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================
   GLASS CARD
   ============================ */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.glass::before {
  display: none;
}

@keyframes liquid-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: var(--transition);
}

.btn:hover::before {
  background: rgba(255, 255, 255, 0.08);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 20px;
  font-size: 0.82rem;
  border-radius: 8px;
  background: var(--gradient);
  color: var(--bg);
}

.btn-sm:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================
   HERO
   ============================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -3px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 32px;
}

.typed-text {
  color: var(--accent2);
  font-weight: 600;
}

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

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-socials {
  display: flex;
  gap: 14px;
}

.hero-socials a {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.hero-socials a:hover {
  background: var(--gradient);
  color: var(--bg);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Code card */
.code-card {
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow), var(--shadow-glow);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-16px);
  }
}

.code-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dots span:nth-child(1) {
  background: #ff5f57;
}

.code-dots span:nth-child(2) {
  background: #febc2e;
}

.code-dots span:nth-child(3) {
  background: #28c840;
}

.code-card pre {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  white-space: pre;
}

.kw {
  color: #c792ea;
}

.fn {
  color: #82aaff;
}

.key {
  color: #f78c6c;
}

.str {
  color: #c3e88d;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--border-hover);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ============================
   ABOUT
   ============================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}

.about-image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
}

.about-stats {
  display: flex;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  flex: 1;
  min-width: 140px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
}

.stat-num {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.id-card {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: var(--transition);
}

.id-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


.id-profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 36px auto 16px;
  border: 4px solid var(--surface);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.id-card-body {
  padding: 0 24px 20px;
}

.id-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.id-role {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.id-card-socials {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.id-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.id-social-btn:hover {
  background: var(--gradient);
  color: var(--bg);
  border-color: transparent;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.app-logos {
  display: flex;
  flex-direction: row;
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: max-content;
  padding: 0 10px;
}

.app-logo-card {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-left: -12px;
  position: relative;
}

.app-logo-card:first-child {
  margin-left: 0;
}

.app-logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.app-logo-card:hover {
  transform: translateY(-10px) scale(1.15);
  border-color: var(--border-hover);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.app-logo-card:hover img {
  transform: scale(1.1);
}

.about-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.skill-tag {
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.skill-tag:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.about-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.social-btn:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
}

.social-btn.linkedin:hover {
  border-color: #0077b5;
  color: #0077b5;
}

.social-btn.instagram:hover {
  border-color: #e4405f;
  color: #e4405f;
}

.social-btn.gmail:hover {
  border-color: #ea4335;
  color: #ea4335;
}

/* ============================
   EDUCATION
   ============================ */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
}

.edu-card {
  position: sticky;
  top: calc(100px + var(--card-index, 0) * 20px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: var(--transition);
}

.edu-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.5s ease;
}

.edu-card:hover .edu-bg-img {
  transform: scale(1.08);
}

.edu-overlay {
  position: absolute;
  inset: 0;
  background: var(--edu-overlay);
  z-index: 1;
}

.edu-body {
  position: relative;
  z-index: 2;
  padding: 32px;
  transition: var(--transition);
  color: var(--text);
}

.edu-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.edu-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  background: var(--gradient);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.edu-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.edu-college,
.edu-year {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.edu-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--border-hover);
}

/* ============================
   PROJECTS
   ============================ */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
}

.project-card {
  position: sticky;
  top: calc(100px + var(--card-index, 0) * 20px);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.project-img-wrap {
  position: relative;
  overflow: hidden;
  height: 380px;
}

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

.project-card:hover .project-img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}

.project-link-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.project-body {
  padding: 24px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ============================
   EXPERIENCE / TIMELINE
   ============================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient);
  opacity: 0.3;
}

.timeline-item {
  position: sticky;
  top: calc(100px + var(--card-index, 0) * 20px);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: start;
}

.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.timeline-card {
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transform: translateX(8px) scale(1.01);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.timeline-org {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.timeline-badge {
  padding: 5px 14px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

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

.timeline-skills span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ============================
   ACHIEVEMENTS
   ============================ */
.achievements-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
  gap: 24px;
}

.achievement-card {
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.achievement-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-hover);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.achievement-card.featured {
  background: var(--surface);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  grid-row: span 1;
}


.achievement-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.achievement-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.achievement-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.achievement-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.achievement-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.achievement-card:not(.featured) h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.achievement-card:not(.featured) p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============================
   CONTACT
   ============================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.contact-info>p {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 100px;
  transition: var(--transition);
}

.contact-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateX(8px);
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--bg);
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.contact-item span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.contact-form {
  border-radius: var(--radius);
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 17px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
  background: var(--surface);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent2);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.form-success.show {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ============================
   FOOTER
   ============================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--gradient);
  color: var(--bg);
  border-color: transparent;
  transform: translateY(-2px);
}

/* (Removed duplicate reveal) */

/* ============================
   RESPONSIVE
   ============================ */
@media(max-width:1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .achievement-card.featured {
    grid-column: span 2;
  }
}

@media(max-width:768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 120px;
    text-align: center;
  }

  .hero-desc,
  .hero-btns,
  .hero-socials {
    justify-content: center;
  }

  .hero-illustration {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }

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

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

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

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

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

  .achievement-card.featured {
    grid-column: span 1;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-dot {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(6, 9, 18, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 4px;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media(max-width:480px) {
  .hero-name {
    font-size: 3rem;
  }

  .about-stats {
    gap: 10px;
  }

  .stat-card {
    padding: 12px 14px;
  }
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-1%, -1%);
  }

  20% {
    transform: translate(-2%, 1%);
  }

  30% {
    transform: translate(1%, -2%);
  }

  40% {
    transform: translate(1%, 1%);
  }

  50% {
    transform: translate(-1%, 2%);
  }

  60% {
    transform: translate(-2%, 0%);
  }

  70% {
    transform: translate(0%, 2%);
  }

  80% {
    transform: translate(-1%, -1%);
  }

  90% {
    transform: translate(1%, -1%);
  }

  100% {
    transform: translate(0, 0);
  }
}

@keyframes orb-flow {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  25% {
    transform: translate(12vw, -8vh) scale(1.15) rotate(90deg);
  }

  50% {
    transform: translate(-8vw, 15vh) scale(0.9) rotate(180deg);
  }

  75% {
    transform: translate(6vw, 12vh) scale(1.05) rotate(270deg);
  }

  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
  }
}

.orb {
  will-change: transform;
}

/* ============================
   PROJECT MODALS (Finsweet)
   ============================ */
.modal_component {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal_overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.modal_content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 24px;
  overflow-y: auto;
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal_content::-webkit-scrollbar {
  display: none;
}

.modal_close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal_close-btn:hover {
  background: var(--surface-hover);
  transform: rotate(90deg);
}

.modal_body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal_image-wrap {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.modal_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal_info {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal_title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal_desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .modal_body {
    grid-template-columns: 1fr;
  }

  .modal_image-wrap {
    min-height: 250px;
  }

  .modal_info {
    padding: 32px 24px;
  }

  .modal_title {
    font-size: 1.75rem;
  }
}

#cursor-dot.hovering {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

#cursor-ring.hovering {
  width: 80px;
  height: 80px;
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

body.cursor-pressed #cursor-ring {
  transform: translate(-50%, -50%) scale(0.85);
  background: var(--border-hover);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

@media (hover: none),
(pointer: coarse) {

  body,
  body * {
    cursor: auto !important;
  }

  #cursor-dot,
  #cursor-ring,
  #mouse-orb {
    display: none !important;
  }
}