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

:root {
  --orange:      #FF6B00;
  --orange-soft: #FFB347;
  --orange-pale: #FFF0E0;
  --dark:        #111111;
  --mid:         #555555;
  --light:       #F5F5F5;
  --white:       #FFFFFF;
  --bg:          #FFFFFF;
  --radius:      18px;
  --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
  --dark:        #F5F5F5;
  --mid:         #A0A0A0;
  --light:       #2A2A2A;
  --white:       #181818;
  --bg:          #121212;
  --orange-pale: #2A1A0D;
}

html { scroll-behavior: smooth; }

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

/* ─── CUSTOM CURSOR ─── */
@media (pointer: fine) {
  * { cursor: none !important; }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 2px solid var(--orange-soft);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
  /* Use a slight delay for the follower effect using JS, not CSS transition on transform to keep it smooth */
}

@media (pointer: coarse) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}

/* Hover effects for the cursor */
.custom-cursor.hover {
  width: 12px;
  height: 12px;
  background-color: var(--dark);
}

.custom-cursor-follower.hover {
  width: 60px;
  height: 60px;
  border-color: var(--orange);
  background-color: rgba(255, 107, 0, 0.1);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 99px; }

/* ─── SELECTION ─── */
::selection { background: var(--orange); color: #fff; }

/* ─── TYPOGRAPHY ─── */
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  color: var(--dark);
}
.section-title em {
  font-style: italic;
  color: var(--orange);
}
.section-title.light { color: #ffffff !important; }
.section-title.light em { color: var(--orange-soft) !important; }

.section-tag {
  display: inline-block;
  background: var(--orange-pale);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.section-tag.light { background: rgba(255,255,255,0.12); color: #fff; }

.section-sub {
  color: var(--mid);
  font-size: 1.05rem;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }

.btn-dark {
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(17,17,17,0.25);
}
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(17,17,17,0.3); }

.btn-light {
  background: var(--light);
  color: var(--dark);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.btn-light:hover { transform: translateY(-2px); background: #eaeaea; }

.btn-orange {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 28px rgba(255,107,0,0.4);
}
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255,107,0,0.5); }

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5%;
  background: var(--bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(128,128,128,0.1);
  transition: box-shadow 0.3s, background 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--mid);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--dark); }
.nav-links a:hover::after { width: 100%; }

.btn-contact {
  background: var(--orange) !important;
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: 99px;
  font-weight: 600;
  transition: var(--transition) !important;
}
.btn-contact:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,0,0.4); }
.btn-contact::after { display: none !important; }


.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 5% 60px;
  gap: 4rem;
  overflow: hidden;
  position: relative;
}

/* Left panel */
.hero-left {
  position: relative;
  width: 420px;
  min-width: 320px;
  height: 520px;
  flex-shrink: 0;
}

/* Blobs */
.blob {
  position: absolute;
  border-radius: 50% 60% 55% 65% / 55% 50% 65% 50%;
  filter: blur(2px);
  animation: blobAnim 8s ease-in-out infinite;
}
.blob-1 {
  width: 300px; height: 280px;
  background: var(--orange);
  top: 60px; left: 60px;
  opacity: 0.95;
  animation-delay: 0s;
}
.blob-2 {
  width: 240px; height: 220px;
  background: var(--orange-soft);
  bottom: 40px; left: 20px;
  opacity: 0.75;
  animation-delay: -3s;
}
.blob-3 {
  width: 180px; height: 160px;
  background: var(--orange-pale);
  top: 30px; left: 180px;
  opacity: 0.9;
  animation-delay: -5s;
}

@keyframes blobAnim {
  0%, 100% { border-radius: 50% 60% 55% 65% / 55% 50% 65% 50%; transform: scale(1) rotate(0deg); }
  33%       { border-radius: 60% 45% 65% 50% / 60% 55% 45% 55%; transform: scale(1.04) rotate(2deg); }
  66%       { border-radius: 45% 65% 50% 60% / 50% 65% 55% 60%; transform: scale(0.97) rotate(-2deg); }
}

/* Photo */
.photo-wrap {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 310px;
  height: 400px;
  z-index: 2;
  overflow: hidden;
  border-radius: 50% 50% 0 0;
}
.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(100%);
  transition: filter 0.5s;
}
.photo-wrap:hover .profile-img { filter: grayscale(0%); }

/* Floating badges */
.badge {
  position: absolute;
  z-index: 5;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,107,0,0.15);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  white-space: nowrap;
  animation: badgeFloat 4s ease-in-out infinite;
}
.badge-top-left { top: 30px; left: -10px; animation-delay: 0s; }
.badge-right    { top: 210px; right: -20px; animation-delay: -1.5s; }
.badge-bottom-left { bottom: 90px; left: -20px; animation-delay: -3s; }

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

body.dark-theme .badge {
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
  border-color: rgba(255, 107, 0, 0.3);
}

/* Right panel */
.hero-right {
  flex: 1;
  max-width: 650px;
}

.greeting {
  font-size: 1.1rem;
  color: var(--mid);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}

.hero-name {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.0;
  color: var(--dark);
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.4s forwards;
}
.hero-name em {
  font-style: italic;
  color: var(--orange);
}

.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #888;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.8s forwards;
}

/* Brands */
.brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  opacity: 0;
  animation: fadeUp 0.7s 1s forwards;
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  padding: 6px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 99px;
  transition: var(--transition);
  cursor: default;
}
.brand:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }
.brand-icon { font-size: 1rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── ABOUT ─── */
.about {
  padding: 100px 5%;
  background: var(--light);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-top: 2rem;
}
.about-text p {
  color: var(--mid);
  margin-bottom: 1rem;
  font-size: 1rem;
}
.about-text strong { color: var(--dark); }

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.8rem;
  color: var(--orange);
  line-height: 1;
}
.stat-plus { font-size: 1.6rem; color: var(--orange); display: inline; }
.stat-label { font-size: 0.82rem; color: var(--mid); font-weight: 500; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }

.about-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.about-blob {
  position: absolute;
  width: 320px;
  height: 320px;
  background: var(--orange);
  opacity: 0.12;
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 55%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: blobAnim 9s ease-in-out infinite;
}
.about-img {
  width: 300px;
  height: 380px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  filter: grayscale(30%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
  transition: filter 0.4s;
}
.about-img:hover { filter: grayscale(0%); }
.about-card {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 2;
}
.about-card-icon { font-size: 1.8rem; }
.about-card strong { display: block; font-size: 0.9rem; color: var(--dark); }
.about-card span { font-size: 0.78rem; color: var(--mid); }

/* ─── PROJECTS ─── */
.projects {
  padding: 100px 5%;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.project-card {
  background: var(--white);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.project-card:hover {
  border-color: var(--orange);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(255,107,0,0.12);
}
.card-wide { grid-column: span 2; }

.project-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 160px;
  height: 120px;
  border-radius: 0 var(--radius) 0 80px;
  opacity: 0.08;
  transition: opacity 0.3s;
}
.project-card:hover .project-visual { opacity: 0.15; }
.pv-1 { background: var(--orange); }
.pv-2 { background: #7C3AED; }
.pv-3 { background: #0EA5E9; }
.pv-4 { background: #10B981; }

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-pale);
  padding: 4px 12px;
  border-radius: 99px;
}
.project-year { font-size: 0.78rem; color: #aaa; font-weight: 500; }
.project-title { font-family: 'DM Serif Display', serif; font-size: 1.5rem; color: var(--dark); }
.project-desc { color: var(--mid); font-size: 0.9rem; line-height: 1.6; flex: 1; }
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project-tech span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--light);
  color: var(--mid);
  border: 1px solid #e0e0e0;
}
.project-links { display: flex; gap: 0.8rem; align-items: center; }
.proj-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.proj-link:hover { color: var(--orange); }
.proj-link-outline {
  border-bottom: none;
  padding: 7px 16px;
  border: 1.5px solid #ddd;
  border-radius: 99px;
  transition: border-color 0.2s;
}
.proj-link-outline:hover { border-color: var(--orange); color: var(--orange); }

/* ─── SKILLS ─── */
.skills {
  padding: 100px 5%;
  background: var(--light);
  text-align: center;
}
.skills .section-tag { display: block; }
.skills .section-title { display: inline-block; margin-bottom: 2.5rem; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.skill-pill {
  background: var(--white);
  border: 1.5px solid #eaeaea;
  border-radius: 99px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  cursor: default;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.skill-pill:hover {
  border-color: var(--orange);
  background: var(--orange-pale);
  color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,107,0,0.12);
}

body.dark-theme .skill-pill {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}
body.dark-theme .skill-pill:hover {
  border-color: var(--orange);
  background: rgba(255,107,0,0.1);
  color: var(--orange);
}

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.tool-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--white);
  border: 1.5px solid #eaeaea;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: var(--transition);
}
.tool-badge:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,107,0,0.1);
}

body.dark-theme .tool-badge {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}
body.dark-theme .tool-badge:hover {
  border-color: var(--orange);
}

/* ─── RESUME BANNER ─── */
.resume-section {
  background: linear-gradient(135deg, #111 0%, #2d1a0e 60%, #1a0a00 100%);
  padding: 100px 5%;
  position: relative;
  overflow: hidden;
}
.resume-section::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,107,0,0.2) 0%, transparent 70%);
  top: -100px;
  right: -100px;
}
.resume-inner {
  position: relative;
  z-index: 1;
  max-width: 500px;
}
.resume-sub {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  margin: 1rem 0 2rem;
}

/* ─── CONTACT ─── */
.contact {
  padding: 100px 5%;
  max-width: 780px;
  margin: 0 auto;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.03em;
}
.form-group input,
.form-group textarea {
  padding: 13px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--dark);
  outline: none;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  color: #fff;
}
body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus {
  border-color: var(--orange);
  background: rgba(255,255,255,0.06);
}

body.dark-theme .form-group input::placeholder,
body.dark-theme .form-group textarea::placeholder { color: #888; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: #bbb; }

.form-success {
  display: none;
  text-align: center;
  padding: 14px;
  background: #f0fff4;
  border: 1.5px solid #10B981;
  border-radius: 12px;
  color: #065f46;
  font-weight: 600;
  font-size: 0.95rem;
}
.form-success.show { display: block; }

.form-error {
  display: none;
  text-align: center;
  padding: 14px;
  background: #fff5f5;
  border: 1.5px solid #F87171;
  border-radius: 12px;
  color: #991b1b;
  font-weight: 600;
  font-size: 0.95rem;
}
.form-error.show { display: block; }

/* ─── FOOTER ─── */
.footer {
  background: #111111;
  color: rgba(255,255,255,0.7);
  padding: 40px 5%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer .logo { color: #ffffff; }
.footer-left p { font-size: 0.82rem; margin-top: 4px; color: rgba(255,255,255,0.45); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-email {
  display: inline-block;
  color: var(--mid);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  letter-spacing: 0.02em;
}
.footer-email:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover {
  background: var(--orange);
  color: #fff;
  transform: translateY(-3px);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ─── RESPONSIVE ─── */

/* ── Large Desktop: 1280px+ ── */
@media (min-width: 1280px) {
  .hero { padding: 120px 8% 80px; gap: 6rem; }
  .hero-left { width: 480px; height: 560px; }
  .photo-wrap { width: 360px; height: 460px; }
  .blob-1 { width: 340px; height: 320px; }
  .blob-2 { width: 280px; height: 260px; }
  .blob-3 { width: 210px; height: 190px; }
}

/* ── Tablet Landscape / Small Desktop: ≤1024px ── */
@media (max-width: 1024px) {
  .hero { padding: 110px 5% 60px; gap: 3rem; }
  .hero-left { width: 360px; height: 460px; }
  .photo-wrap { width: 270px; height: 360px; }
  .blob-1 { width: 260px; height: 240px; top: 50px; left: 50px; }
  .blob-2 { width: 200px; height: 180px; }
  .blob-3 { width: 150px; height: 130px; left: 150px; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-image-wrap { display: none; }
  .about-stats { gap: 2rem; }

  .projects-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .card-wide { grid-column: span 2; }

  .section-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
}

/* ── Tablet Portrait: ≤768px ── */
@media (max-width: 768px) {
  /* Navbar */
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 5%;
    gap: 1.2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    z-index: 998;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .hamburger { display: flex; }

  /* Hero */
  .hero {
    flex-direction: column;
    padding: 100px 5% 60px;
    text-align: center;
    gap: 2.5rem;
    min-height: auto;
  }
  .hero-left {
    width: 280px;
    height: 360px;
    min-width: unset;
    margin: 0 auto;
    overflow: visible;
  }
  .photo-wrap { width: 200px; height: 280px; }
  .blob-1 { width: 190px; height: 180px; top: 30px; left: 30px; }
  .blob-2 { width: 160px; height: 140px; bottom: 20px; left: 10px; }
  .blob-3 { width: 120px; height: 100px; top: 10px; left: 110px; }

  .badge { font-size: 0.7rem; padding: 5px 10px; }
  .badge-top-left  { top: 0px; left: 5px; }
  .badge-right     { top: 150px; right: -5px; }
  .badge-bottom-left { bottom: 60px; left: 0px; }

  .hero-right { max-width: 100%; }
  .greeting   { justify-content: center; }
  .hero-cta   { justify-content: center; flex-wrap: wrap; }
  .brands     { justify-content: center; flex-wrap: wrap; }

  /* About */
  .about { padding: 70px 5%; }
  .about-stats { gap: 1rem; flex-wrap: nowrap; justify-content: space-between; overflow-x: auto; padding-bottom: 5px; }
  .stat-num { font-size: 2rem; }
  .stat-label { font-size: 0.72rem; }

  /* Projects */
  .projects { padding: 70px 5%; }
  .projects-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .card-wide { grid-column: span 1; }

  /* Skills */
  .skills { padding: 70px 5%; }

  /* Resume */
  .resume-section { padding: 70px 5%; }
  .resume-inner { max-width: 100%; }

  /* Contact */
  .contact { padding: 70px 5%; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    padding: 36px 5%;
  }
  .footer-left { display: flex; flex-direction: column; align-items: center; }
  .footer-right { align-items: center; }
}

/* ── Large Mobile: ≤480px ── */
@media (max-width: 480px) {
  .navbar { padding: 14px 4%; }
  .logo { font-size: 1.25rem; }

  .hero { padding: 80px 4% 50px; gap: 2rem; }
  .hero-left { width: 260px; height: 330px; }
  .photo-wrap { width: 190px; height: 260px; }
  .blob-1 { width: 180px; height: 165px; top: 35px; left: 35px; }
  .blob-2 { width: 145px; height: 130px; }
  .blob-3 { width: 110px; height: 95px; left: 110px; }

  .badge { font-size: 0.68rem; padding: 5px 10px; }
  .badge-top-left  { top: 5px; left: 15px; }
  .badge-right     { top: 150px; right: 5px; }
  .badge-bottom-left { bottom: 55px; left: 15px; }

  .hero-name { font-size: 2.6rem; line-height: 1.1; }
  .hero-sub  { font-size: 1rem; }
  .hero-cta { flex-direction: column; width: 100%; align-items: stretch; gap: 15px; margin-bottom: 2rem; }
  .btn { padding: 11px 18px; font-size: 0.88rem; width: 100%; justify-content: center; }

  .section-title { font-size: 1.8rem; }
  .section-sub   { font-size: 0.92rem; }

  .about { padding: 60px 4%; }
  .about-stats { gap: 0.8rem; justify-content: space-between; }
  .stat-num { font-size: 1.5rem; }
  .stat-plus { font-size: 1.2rem; }
  .stat-label { font-size: 0.65rem; }

  .projects { padding: 60px 4%; }
  .project-card { padding: 1.5rem; }

  .skills { padding: 60px 4%; }
  .skill-pill { font-size: 0.82rem; padding: 8px 16px; }
  .tool-badge { font-size: 0.8rem; padding: 8px 14px; }

  .resume-section { padding: 60px 4%; }
  .contact { padding: 60px 4%; }

  .footer-socials { gap: 0.7rem; }
  .social-icon { width: 36px; height: 36px; }
}

/* ── Small Mobile: ≤360px ── */
@media (max-width: 360px) {
  .hero { padding: 75px 4% 40px; }
  .hero-left { width: 230px; height: 290px; }
  .photo-wrap { width: 165px; height: 225px; }
  .blob-1 { width: 155px; height: 140px; top: 28px; left: 28px; }
  .blob-2 { width: 120px; height: 108px; }
  .blob-3 { width: 90px; height: 78px; left: 90px; }

  /* Hide bottom-left badge on very tiny screens to avoid overflow */
  .badge-bottom-left { display: none; }
  .badge-top-left { left: 10px; }
  .badge-right { right: 5px; }

  .hero-name { font-size: 2.1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 0.7rem; width: 100%; }
  .btn { width: 100%; justify-content: center; }

  .about-stats { gap: 0.5rem; justify-content: space-between; }
  .stat-num { font-size: 1.3rem; }
  .stat-plus { font-size: 1rem; }
  .stat-label { font-size: 0.55rem; }

  .project-card { padding: 1.2rem; }
  .project-title { font-size: 1.25rem; }
  .skill-pill { font-size: 0.78rem; padding: 7px 14px; }
}

/* ─── REVEAL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

