/* ---------- Custom Cursor ---------- */
.custom-cursor {
  width: 20px;
  height: 20px;
  background: rgba(99,102,241,0.2);
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.custom-cursor.cursor-hover {
  width: 40px;
  height: 40px;
  background: rgba(99,102,241,0.1);
  backdrop-filter: blur(4px);
}

/* Hide cursor on touch devices */
@media (hover: none) {
  .custom-cursor {
    display: none;
  }
}

/* ---------- Root & Reset ---------- */
:root {
  --bg-0: #030712;
  --bg-1: #0F172A;
  --bg-2: #1E293B;
  --text-0: #F8FAFC;
  --text-1: #94A3B8;
  --text-2: #475569;
  --accent: #6366F1;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #818CF8 100%);
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-display: 'General Sans', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Responsive font sizes */
  --fs-xl: clamp(2.5rem, 5vw, 4rem);
  --fs-lg: clamp(2rem, 4vw, 3rem);
  --fs-md: clamp(1.25rem, 3vw, 1.5rem);
  --fs-sm: clamp(0.875rem, 2vw, 1rem);
}

/* Base responsive typography */
.hero-title { font-size: var(--fs-xl); }
.section-title { font-size: var(--fs-lg); }
.hero-subtitle { font-size: var(--fs-md); }
.hero-desc { font-size: var(--fs-sm); }

body.light-theme {
  --bg-0: #FFFFFF;
  --bg-1: #F8FAFC;
  --bg-2: #F1F5F9;
  --text-0: #0F172A;
  --text-1: #334155;
  --text-2: #64748B;
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 32px rgba(15,23,42,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
  scroll-behavior: smooth;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 70px;
}

/* ---------- Background Orbs ---------- */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.24;
}
.orb-1 { width: 600px; height: 600px; background: var(--accent); top: -300px; left: -300px; }
.orb-2 { width: 400px; height: 400px; background: #8B5CF6; top: 20%; right: -200px; }
.orb-3 { width: 500px; height: 500px; background: #10B981; bottom: -250px; left: 30%; }

/* ---------- Theme Transitions ---------- */
*, *::before, *::after {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 1000;
  height: 70px;
  display: flex;
  align-items: center;
}
body.light-theme .navbar { background: rgba(255,255,255,0.7); border-bottom: 1px solid rgba(0,0,0,0.06); }
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1.25rem;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
}
.logo {
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  width: 36px; height: 36px; border-radius: 8px; object-fit: cover;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-0);
}
.nav-menu {
  display: none important; 
  gap: 2rem;
  flex: 1;
}
.nav-link {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--text-0); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

@media (max-width: 768px) {
  .nav-link {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-0);
    font-size: 1rem;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-link:hover {
    background: rgba(99,102,241,0.1);
  }
  
  .nav-link.active {
    background: rgba(99,102,241,0.15);
    color: var(--accent);
  }
}

.theme-toggle {
  background: var(--bg-2);
  border: none;
  cursor: pointer;
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  margin-left: auto;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-0);
  background: var(--bg-1);
  transform: translateY(-2px);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon {
  transform: translateY(100%) rotate(90deg);
  opacity: 0;
}

.moon-icon {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

body.light-theme .sun-icon {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

body.light-theme .moon-icon {
  transform: translateY(-100%) rotate(-90deg);
  opacity: 0;
}

.mobile-toggle {
  display: none !important; 
  flex-direction: column; 
  gap: 4px; 
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
  color: var(--text-0);
}
.mobile-toggle span {
  width: 24px; height: 2px; background: var(--text-0); transition: 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 8rem 0 4rem; 
  width: 100%;
}
.hero-container {
  max-width: 1200px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-1);
  margin-bottom: 1rem;
}
.bullet {
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 0.5rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-1);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  line-height: 1.4;
}

.subtitle-container {
  flex: 1;
  background: var(--bg-1);
  border-radius: 12px;
  padding: 0.5em 1em;
  border: 2px solid rgba(99,102,241,0.3);
  box-shadow: 0 4px 20px rgba(99,102,241,0.15);
  min-width: 260px;
  max-width: 100%;
}

.subtitle-rotate {
  position: relative;
  height: 1.5em;
  overflow: hidden;
  width: 100%;
}

.rotate-word {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  animation: rotateWords 15s infinite;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  display: flex;
  align-items: center;
  text-shadow: 0 0 20px rgba(99,102,241,0.3);
}

.hero-subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.subtitle-static {
  color: var(--text-1);
  font-weight: 500;
}

.rotate-word {
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.rotate-word:nth-child(1) { animation-delay: 0s; }
.rotate-word:nth-child(2) { animation-delay: 3s; }
.rotate-word:nth-child(3) { animation-delay: 6s; }
.rotate-word:nth-child(4) { animation-delay: 9s; }
.rotate-word:nth-child(5) { animation-delay: 12s; }

@keyframes rotateWords {
  0%, 15% {
    transform: translateY(0%);
    opacity: 1;
  }
  18%, 33% {
    transform: translateY(-100%);
    opacity: 1;
  }
  36%, 51% {
    transform: translateY(-200%);
    opacity: 1;
  }
  54%, 69% {
    transform: translateY(-300%);
    opacity: 1;
  }
  72%, 87% {
    transform: translateY(-400%);
    opacity: 1;
  }
  90%, 100% {
    transform: translateY(0%);
    opacity: 0;
  }
}
.hero-desc {
  max-width: 480px; color: var(--text-1); margin-bottom: 2rem;
}
.hero-actions {
  display: flex; gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  min-width: 48px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99,102,241,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-0);
  border: 2px solid rgba(255,255,255,0.1);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }
  
  .hero {
    padding-top: 7rem;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-visual {
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }

  .code-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 90%;
    max-width: 280px;
    margin: -3rem auto 0;
    transform: rotate(0);
  }

  .code-card:hover {
    transform: translateY(-10px);
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .hero-subtitle {
    justify-content: center;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }

  .subtitle-container {
    margin: 0;
    min-width: 200px;
  }

  .about-grid,
  .contact-grid,
  .projects-grid,
  .skills-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skill-icon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hero-photo {
  position: relative;
  width: 400px;
  height: 400px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(99,102,241,0.3);
  z-index: 1;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) contrast(1.1);
}
.photo-glow {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  pointer-events: none;
}
.code-card {
  width: 320px;
  background: var(--bg-1);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  position: absolute;
  right: -100px;
  bottom: 60px;
  transform: rotate(2deg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
  z-index: 2;
  backdrop-filter: blur(10px);
  background: rgba(20, 20, 20, 0.8);
}

.code-card:hover {
  transform: rotate(0deg) translateX(-20px);
  box-shadow: 0 20px 40px rgba(99,102,241,0.3);
  border-color: var(--accent);
}

.code-card:hover {
  transform: translateY(-52%) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(99,102,241,0.2);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--bg-2);
}
.card-dots {
  display: flex; gap: 6px;
}
.card-dots span {
  width: 12px; height: 12px; border-radius: 50%;
}
.card-dots span:nth-child(1) { background: #ff5f57; }
.card-dots span:nth-child(2) { background: #ffbd2e; }
.card-dots span:nth-child(3) { background: #28ca42; }
.card-title {
  font-size: 0.75rem; color: var(--text-1); font-family: var(--font-body);
}
.card-code {
  padding: 1rem; font-size: 0.8rem; line-height: 1.5; font-family: 'JetBrains Mono', monospace;
}
.token.keyword { color: #c678dd; }
.token.name { color: #e06c75; }
.token.key { color: #56b6c2; }
.token.string { color: #98c379; }
.token.bool { color: #56b6c2; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-1); font-size: 0.875rem;
}

@media (max-width: 768px) {
  .scroll-hint {
    display: none;
  }
}
.mouse {
  width: 24px; height: 38px; border: 2px solid var(--text-1); border-radius: 12px; position: relative;
}
.wheel {
  width: 4px; height: 8px; background: var(--text-1); border-radius: 2px; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

/* ---------- Sections ---------- */
.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
    width: 100%;
  }
}

.section-head { text-align: center; margin-bottom: 4rem; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--text-1); font-size: 1.125rem;
}

/* About */
.about {
  padding: 8rem 0;
  width: 100%;
}

@media (max-width: 768px) {
  .about {
    padding: 4rem 0;
  }
}
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.about-text p {
  font-size: 1.125rem; color: var(--text-1); margin-bottom: 2rem;
}
.about-stats {
  display: flex; gap: 2rem; margin-bottom: 2rem;
}
.stat h4 {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--accent);
}
.stat p {
  font-size: 0.875rem; color: var(--text-1);
}
.skill-icon-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.skill-icon {
  aspect-ratio: 1;
  background: var(--bg-1);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-0);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.skill-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.skill-icon:hover::before {
  opacity: 0.1;
}

.skill-icon svg {
  width: 32px;
  height: 32px;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.skill-icon:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

[data-skill="js"] { color: #F7DF1E; }
[data-skill="python"] { color: #3776AB; }
[data-skill="react"] { color: #61DAFB; }
[data-skill="node"] { color: #339933; }
[data-skill="automation"] { color: #FF6B6B; }
[data-skill="funnel"] { color: #4CAF50; }
.skill-icon:hover {
  transform: translateY(-4px); border-color: var(--accent);
}

/* Skills */
.skills {
  padding: 8rem 0; 
  background: var(--bg-1);
  width: 100%;
}

@media (max-width: 768px) {
  .skills {
    padding: 4rem 0;
  }
}
.skills-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .skills-wrap {
    grid-template-columns: 1fr;
  }
}

.skills-wrap::before {
  content: '';
  position: absolute;
  inset: -2rem;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
  opacity: 0.05;
  pointer-events: none;
}
.skill-category h3 {
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3::after {
  content: '';
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, var(--accent), transparent);
  opacity: 0.3;
}
.skill-bar {
  margin-bottom: 1.25rem;
  position: relative;
}

.skill-bar .info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.skill-bar .info span:last-child {
  color: var(--accent);
  font-family: var(--font-display);
}

.skill-bar .bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.skill-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(99,102,241,0.8));
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-bar .fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background: white;
  opacity: 0.2;
  filter: blur(2px);
}

/* Projects */
.projects {
  padding: 8rem 0;
  width: 100%;
}

@media (max-width: 768px) {
  .projects {
    padding: 4rem 0;
  }
}
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem;
}
.project-card {
  background: var(--bg-1);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.project-card .project-image {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
}

.project-card .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}
.project-card:hover {
  transform: translateY(-6px); border-color: var(--accent);
}
.card-top {
  display: flex; gap: 0.5rem; margin-bottom: 1rem;
}
.tags span {
  font-size: 0.75rem; background: var(--bg-2); color: var(--text-1); padding: 0.25rem 0.6rem; border-radius: 6px;
}
.project-card h3 {
  font-family: var(--font-display); margin-bottom: 0.5rem;
}
.project-card p {
  font-size: 0.9rem; color: var(--text-1); margin-bottom: 1rem;
}
.card-foot {
  display: flex; gap: 1rem;
}
.card-foot .link {
  color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.875rem;
}

/* Contact */
.contact {
  padding: 8rem 0; 
  background: var(--bg-1);
  width: 100%;
}

@media (max-width: 768px) {
  .contact {
    padding: 4rem 0;
  }
}
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
}
.contact-info h3 {
  margin-bottom: 1rem; font-family: var(--font-display);
}
.contact-info p {
  margin-bottom: 2rem; color: var(--text-1);
}
.contact-list .item {
  display: flex; gap: 1rem; margin-bottom: 1.5rem;
}
.contact-list .item svg {
  flex-shrink: 0; color: var(--accent);
}
.contact-list .item strong {
  display: block; font-size: 0.875rem; color: var(--text-0);
}
.contact-list .item a {
  color: var(--text-1); text-decoration: none; font-size: 0.875rem;
}
.contact-form {
  display: flex; flex-direction: column; gap: 1rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; 
  padding: 0.75rem 1rem; 
  background: var(--bg-0); 
  border: 2px solid var(--bg-2); 
  border-radius: 8px; 
  color: var(--text-0); 
  font-family: var(--font-body); 
  transition: 0.2s;
  font-size: 16px;
  min-height: 44px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  padding: 3rem 0; 
  border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%;
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0;
  }
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
}
.footer-brand {
  display: flex; align-items: center; gap: 0.75rem;
}
.footer-brand img {
  width: 28px; height: 28px; border-radius: 6px; object-fit: cover;
}
.footer-brand span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.125rem;
}
.footer-links {
  display: flex; gap: 1.5rem;
}
.footer-links a {
  color: var(--text-1); text-decoration: none; font-size: 0.875rem; transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  text-align: center; font-size: 0.75rem; color: var(--text-2);
}

/* ---------- Responsive ---------- */
/* Tablet & Medium Devices */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-0);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1.5rem 0;
    z-index: 999;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
    backdrop-filter: blur(8px);
  }
  .nav-menu.active { display: flex; }
  .mobile-toggle { display: flex; }
  
  .hero {
    padding: 3rem 1.5rem 4rem;
    min-height: auto;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-subtitle {
    justify-content: center;
    flex-wrap: wrap;
  }

  .subtitle-container {
    margin: 0 auto;
    padding: 0.6em 1em;
    flex-basis: 100%;
  }

  .hero-visual {
    padding: 0 1rem;
    flex-direction: column;
    max-width: 100%;
    gap: 2rem;
  }

  .hero-photo {
    width: 100%;
    max-width: 280px;
    height: 280px;
    margin: 0 auto;
  }

  .code-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    transform: rotate(0);
  }

  .code-card:hover {
    transform: translateY(-8px);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skill-icon-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .skills-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    flex: 1;
    min-width: 140px;
    max-width: 100%;
  }

  .section-head {
    margin-bottom: 2.5rem;
  }

  .container {
    padding: 0 1.5rem;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    padding: 1rem;
    font-size: 16px;
  }

  .about-stats {
    gap: 1.5rem;
  }

  .stat {
    text-align: center;
  }
}

/* Extra Small Devices */
@media (max-width: 375px) {
  .nav-container {
    padding: 0.75rem 0.75rem;
  }

  .logo-text {
    display: none;
  }

  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero-container {
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
  }

  .subtitle-container {
    padding: 0.5em 0.8em;
    min-width: 160px;
  }

  .hero-desc {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-photo {
    max-width: 240px;
    height: 240px;
  }

  .code-card {
    max-width: 100%;
    width: 90vw;
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .skill-icon-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .skill-icon {
    width: 50px;
    height: 50px;
  }

  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }

  .project-card {
    margin: 0;
  }

  .project-card .project-image {
    height: 200px;
  }

  .contact-list .item {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-brand span {
    font-size: 1rem;
  }
}