* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.6s ease, color 0.6s ease;
  overflow-x: hidden;
}
:root {
  --bg: #ffffff;
  --bg-rgb: 255, 255, 255;
  --text: #111827; /* slightly off-black for better readability */
  --accent: #6C5CE7; /* primary purple */
  --accent-2: #FF6B6B; /* secondary coral */
  --muted: #6b7280;
  --card-bg: #fbfaff; /* very light lilac */
  --card-shadow: rgba(15, 15, 20, 0.04);
  --card-hover-shadow: rgba(15, 15, 20, 0.08);
  --section-bg: #f6f4ff;
  --highlight-gradient: linear-gradient(90deg, var(--accent), var(--accent-2));
  
  /* Mobile-specific vars */
  --header-height: 60px;
  --mobile-nav-timing: 0.4s;
  --mobile-padding: 1rem;
}
body.dark {
  --bg: #0b0b12;
  --bg-rgb: 11, 11, 18;
  --text: #e6e7eb;
  --accent: #7c6cff;
  --accent-2: #ff7b7b;
  --card-bg: #0f0e16;
  --card-shadow: rgba(0,0,0,0.5);
  --card-hover-shadow: rgba(0,0,0,0.6);
  --section-bg: #0f0e16;
}

/* Gate Intro */
.intro-split {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  display: flex; overflow: hidden; z-index: 999;
}
.split {
  width: 50%; height: 100%; position: relative;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
  display: flex; align-items: center; justify-content: center;
}
.left { 
  background: var(--bg);
  transform-origin: left;
  padding: 0;
  overflow: hidden;
}
.right { 
  background: var(--accent);
  transform-origin: right;
}

.intro-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1.2s ease forwards;
  position: relative;
  overflow: visible;
  background: linear-gradient(120deg, var(--bg), var(--section-bg));
  padding: 0;
  margin: 0;
}

.intro-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0,0,0,0.05), transparent);
  animation: gradientMove 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.intro-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.03));
  pointer-events: none;
  z-index: 0;
}



.intro-portrait {
  width: 90%;
  height: 90%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 0px;
  box-shadow: none;
  transform: none;
  animation: portraitIntro 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.3s;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.02) contrast(1.02);
  position: relative;
  z-index: 1;
}

.intro-image-container:hover .intro-portrait {
  transform: scale(1);
}



@keyframes partyTransition {
  0% {
    transform: translateY(-5px) scale(1.02) rotateZ(0deg);
    filter: brightness(1.02) contrast(1.02) hue-rotate(0deg);
  }
  25% {
    transform: translateY(-10px) scale(1.05) rotateZ(-2deg);
    filter: brightness(1.1) contrast(1.1) hue-rotate(15deg);
  }
  50% {
    transform: translateY(-8px) scale(1.03) rotateZ(2deg);
    filter: brightness(1.15) contrast(1.15) hue-rotate(30deg);
  }
  75% {
    transform: translateY(-12px) scale(1.06) rotateZ(-1deg);
    filter: brightness(1.1) contrast(1.1) hue-rotate(15deg);
  }
  100% {
    transform: translateY(-5px) scale(1.02) rotateZ(0deg);
    filter: brightness(1.02) contrast(1.02) hue-rotate(0deg);
  }
}

@keyframes portraitIntro {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gradientMove {
  0% {
    opacity: 0.4;
    transform: translate(-5%, -5%) scale(1.1);
  }
  100% {
    opacity: 0.8;
    transform: translate(5%, 5%) scale(1);
  }
}

.intro-content {
  text-align: left;
  color: #fff;
  padding: 2rem;
  max-width: 600px;
  animation: fadeIn 1.2s ease forwards;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.intro-name { 
  font-size: 3.2rem; 
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  transform: translateY(20px);
  animation: floatUp 1s ease forwards 0.3s;
}

.intro-tag { 
  font-size: 1.2rem; 
  margin: 0;
  line-height: 1.4;
  transform: translateY(20px);
  animation: floatUp 1s ease forwards 0.5s;
}

.intro-subtag { 
  font-size: 1.1rem; 
  opacity: 0.9; 
  margin: 0;
  padding-bottom: 0.5rem;
  transform: translateY(20px);
  animation: floatUp 1s ease forwards 0.7s;
}

.enter-btn {
  padding: 1rem 2.5rem;
  border: 2px solid #fff;
  border-radius: 50px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(20px);
  animation: floatUp 1s ease forwards 0.9s;
  position: relative;
  overflow: hidden;
}

.enter-btn:hover { 
  background: #fff;
  color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.enter-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.enter-btn:hover::after {
  width: 300px;
  height: 300px;
}

@keyframes floatUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none; }
.container { width: 90%; max-width: 1100px; margin: auto; }
.section { padding: 1.2rem 0; transition: all 0.3s ease; }
.site-header + #mainContent > section:first-child { padding-top: 0.4rem; }
.bg-contrast { 
  background: var(--section-bg);
  color: var(--text);
}

/* Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 0;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero-title .highlight {
  background: var(--highlight-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.3s ease;
}

body.dark .badge {
  border-color: rgba(255, 255, 255, 0.1);
}

.badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.dark .badge:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.badge.accent {
  background: linear-gradient(90deg, rgba(108,92,231,0.98), rgba(255,107,107,0.95));
  color: #fff;
  border-color: transparent;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px rgba(255,107,107,0.22);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-main:hover .btn-icon {
  transform: translateY(2px);
}

.site-header {
  position: sticky; top: 0; background: var(--bg); z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.header-row { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 1rem 1rem;
  position: relative;
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.logo-badge {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(108,92,231,0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.logo-badge:hover {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 8px 26px rgba(108,92,231,0.16);
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}
.logo:hover {
  color: var(--accent);
}
.nav {
  margin-right: 1rem;
}
.nav a {
  color: var(--text); 
  text-decoration: none; 
  font-weight: 600; 
  margin-left: 1rem; 
  transition: color 0.3s ease;
}
.nav a:hover { color: var(--accent-2); }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
  z-index: 100;
  transition: transform 0.3s ease;
}
.menu-toggle.active {
  transform: rotate(90deg);
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 250px;
    height: calc(100vh - var(--header-height));
    background: var(--bg);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }
  .nav.active {
    right: 0;
  }
  .nav-list {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
  }
  .nav a {
    margin: 0;
    padding: 0.8rem 0;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .nav a:last-child {
    border-bottom: none;
  }
}
h2 { font-size: 2rem; margin-bottom: 1rem; }

/* Cards and Projects */
.grid-4, .grid-3 { display: grid; gap: 0.6rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Projects: force a 2x2 layout for the Projects section and keep it responsive */
#projects .grid-3 {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

@media (max-width: 700px) {
  /* Single column on small screens */
  #projects .grid-3 {
    grid-template-columns: 1fr;
  }
}
.card, .project {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px var(--card-shadow);
  transition: all 0.4s ease;
  border: 1px solid rgba(255,255,255,0.05);
}
.project:hover, .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px var(--card-hover-shadow);
}
.project img { 
  width: 100%;
  border-radius: 0.8rem;
  margin-bottom: 0.6rem;
}

/* Styles for project cards (anchors with class project-card) to match .project/.card appearance */
.project-card {
  background: var(--card-bg);
  padding: 0.8rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px var(--card-shadow);
  transition: all 0.35s ease;
  border: 1px solid rgba(255,255,255,0.05);
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px var(--card-hover-shadow);
}
.project-card img {
  width: 100%;
  border-radius: 0.8rem;
  margin-bottom: 0.6rem;
  display: block;
}
.project-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}
.card h3 {
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}
.card p {
  color: var(--accent);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Vertical Timeline */
.timeline-wrapper {
  position: relative; max-width: 900px; margin: 0 auto; padding: 2rem 0;
}
.timeline-wrapper::after {
  content: ""; position: absolute; width: 4px; background-color: var(--bg);
  top: 0; bottom: 0; left: 50%; transform: translateX(-50%); opacity: 0.2;
}
.timeline-item { padding: 1rem 2rem; position: relative; width: 50%; }
.timeline-item::after {
  content: ""; position: absolute; width: 20px; height: 20px;
  background: var(--bg); border: 3px solid var(--text);
  border-radius: 50%; top: 25px; z-index: 1;
}
.timeline-item.left::after { right: -11px; }
.timeline-item.right::after { left: -11px; }
.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-content {
  background: var(--bg); color: var(--text); padding: 1.5rem;
  border-radius: 1rem; box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.4s ease;
}
.timeline-content:hover { transform: translateY(-5px); }
.timeline-content h3 { margin-bottom: 0.5rem; font-size: 1.4rem; font-weight: 700; }
.timeline-content p { font-size: 0.95rem; line-height: 1.5; }

/* Timeline Animation */
.timeline-item.left.reveal.active .timeline-content {
  animation: slideLeft 0.8s ease forwards;
}
.timeline-item.right.reveal.active .timeline-content {
  animation: slideRight 0.8s ease forwards;
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
  .timeline-wrapper::after { left: 8px; }
  .timeline-item { width: 100%; padding-left: 3rem; padding-right: 0; }
  .timeline-item.right { left: 0; }
  .timeline-item::after { left: 0; }
}

/* Contact & Footer */
.contact { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.socials {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.social-link {
  text-decoration: none;
  color: var(--text);
  font-size: 1.5rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  color: #fff;
}

.social-link:hover::before {
  opacity: 1;
}

.social-link i {
  position: relative;
  z-index: 1;
}

/* Social media brand colors on hover */
.social-link[aria-label="LinkedIn"]:hover { background: #0077b5; }
.social-link[aria-label="WhatsApp"]:hover { background: #25D366; }
.social-link[aria-label="Facebook"]:hover { background: #1877f2; }
.social-link[aria-label="Instagram"]:hover { 
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.social-link[aria-label="Twitter"]:hover { background: #1da1f2; }
.social-link[aria-label="GitHub"]:hover { background: #333; }
.site-footer { text-align: center; padding: 1rem 0; border-top: 1px solid var(--accent); }

/* Reveal Fade */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive */
/* Responsive Styles */
@media (max-width: 1024px) {
  .container { width: 95%; }
  .intro-name { font-size: 2.8rem; }
  .grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 768px) {
  /* Header & Navigation */
  .site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(var(--bg-rgb), 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .header-row {
    padding: 0.8rem 1rem;
    position: relative;
  }
  .logo {
    font-size: 1.2rem;
    z-index: 100;
  }
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
  }
  .nav.active {
    transform: translateX(0);
  }
  .nav a {
    margin: 0;
    font-size: 1.4rem;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
  }
  .nav a:hover {
    opacity: 1;
    transform: translateX(5px);
  }
  
  /* Main Content Adjustment for Fixed Header */
  main {
    padding-top: 60px;
  }
  
  /* Intro Split - Mobile View */
  .intro-split {
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    margin-top: 0;
    position: relative;
    top: 0;
    left: 0;
  }
  .split {
    width: 100%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
  }
  .left {
    width: 100%;
    height: 50%;
    padding: 0;
    overflow: hidden;
    background: var(--bg);
    order: 1;
  }
  .right {
    width: 100%;
    height: 50%;
    padding: 2rem 1.5rem;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
    position: relative;
    z-index: 1;
  }
  .intro-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: linear-gradient(120deg, var(--bg), var(--section-bg));
  }
  .intro-portrait {
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    animation: portraitIntro 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.3s;
  }
  .intro-content {
    text-align: center;
    color: #fff;
    padding: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    height: 100%;
  }
  .intro-name { 
    font-size: 2rem;
    margin: 0;
    line-height: 1.2;
  }
  .intro-tag { 
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
  }
  .intro-subtag { 
    font-size: 0.9rem;
    margin: 0;
    padding-bottom: 1rem;
  }
  .enter-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }
  
  /* Sections & Content */
  .section { 
    padding: 3rem 1rem;
    scroll-margin-top: 60px;
  }
  .container {
    width: 100%;
    padding: 0 1rem;
  }
  .hero h2 { 
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  /* Grids */
  .grid-3, .grid-4 { 
    gap: 1.2rem;
  }
  .grid-3 { 
    grid-template-columns: 1fr;
  }
  .grid-4 { 
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Cards & Projects */
  .card, .project {
    padding: 1.2rem;
  }
  .card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  .project-card {
    margin-bottom: 1rem;
  }
  .project-card img {
    height: 200px;
  }
  
  /* Timeline */
  .timeline-wrapper {
    padding: 1rem 0;
  }
  .timeline-wrapper::after { 
    left: 1rem;
  }
  .timeline-item {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1.5rem;
  }
  .timeline-item.right { 
    left: 0;
  }
  .timeline-item::after { 
    left: 0.85rem;
  }
  .timeline-content {
    padding: 1rem;
  }
  .timeline-content h3 {
    font-size: 1.2rem;
  }
  
  /* Contact & Footer */
  .contact {
    flex-direction: column;
    gap: 2rem;
    padding: 0 1rem;
  }
  .contact h2 {
    text-align: center;
  }
  .socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem 0;
  }
  .socials a {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 2rem;
    box-shadow: 0 2px 8px var(--card-shadow);
  }
}

@media (max-width: 480px) {
  /* Finer adjustments for very small screens */
  .intro-name { font-size: 1.5rem; }
  .intro-portrait { max-width: 220px; }
  .section { padding: 2rem 0; }
  .card h3 { font-size: 1.1rem; }
  .project-card img { height: 160px; }
  .project-hero { margin: 0.5rem 0 1.5rem; }
  .project-detail h1 { font-size: 1.6rem; }
  
  /* Intro mobile adjustments - Full screen split 50/50 */
  .intro-split {
    min-height: 100vh;
    height: 100vh;
    flex-direction: column;
  }
  .split {
    height: 50%;
    width: 100%;
  }
  .left {
    height: 50%;
    min-height: auto;
    width: 100%;
    order: 1;
  }
  .right {
    height: 50%;
    padding: 1.5rem 1rem;
    width: 100%;
    order: 2;
  }
  .intro-name {
    font-size: 1.4rem;
    line-height: 1.1;
  }
  .intro-tag {
    font-size: 0.85rem;
  }
  .intro-subtag {
    font-size: 0.8rem;
  }
  .enter-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Project Cards */
.project-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-card h3 {
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

/* Project Detail Pages */
/* Project Detail Page */
.project-detail { 
  padding: 6rem 0 4rem; 
  opacity: 0; 
  transform: translateY(20px); 
  animation: fadeUp 0.8s ease forwards;
  max-width: 900px;
  margin: 0 auto;
}

.project-hero { 
  width: 100%; 
  border-radius: 1rem; 
  margin: 1.5rem 0 2.5rem; 
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.back-link { 
  text-decoration: none; 
  color: var(--text); 
  font-weight: 600; 
  display: inline-flex;
  align-items: center;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.back-link:hover { 
  color: var(--accent);
  transform: translateX(-5px);
}

.project-detail h1 { 
  font-size: 2.5rem; 
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.project-detail h2 { 
  margin: 2.5rem 0 1rem;
  font-size: 1.6rem;
}

.project-detail p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.project-detail ul { 
  padding-left: 1.5rem; 
  list-style: disc; 
  margin: 1rem 0 2rem;
}

.project-detail li {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0.7rem 0;
  color: var(--text);
  opacity: 0.9;
}

.project-detail li strong {
  color: var(--text);
  opacity: 1;
}

/* Mobile Responsive Project Detail */
@media (max-width: 768px) {
  .project-detail {
    padding-top: calc(var(--header-height) + 2rem);
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
    padding-bottom: 3rem;
    width: 100%;
  }
  
  .project-hero {
    border-radius: 0.8rem;
    margin: 1rem 0 2rem;
    max-height: 300px;
    width: 100%;
  }
  
  .back-link {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    padding: 1rem var(--mobile-padding);
    margin: 0;
    background: var(--bg);
    z-index: 90;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
  }
  
  .project-detail h1 {
    font-size: 1.8rem;
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  
  .project-detail h2 {
    font-size: 1.4rem;
    margin: 2rem 0 0.8rem;
  }
  
  .project-detail p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .project-detail ul {
    padding-left: 1.2rem;
    margin: 0.8rem 0 1.5rem;
  }
  
  .project-detail li {
    font-size: 0.95rem;
    margin: 0.5rem 0;
  }
}

/* Additional project & content helpers */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.tech-table th, .tech-table td {
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0.75rem 1rem;
  text-align: left;
}
.tech-table th {
  background: var(--accent);
  color: var(--bg);
}
blockquote {
  font-style: italic;
  border-left: 4px solid var(--text);
  padding-left: 1rem;
  margin-top: 1rem;
  opacity: 0.9;
}

/* Tech stack badges / card-like buttons */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
  align-items: center;
}
.tech-badge {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0,0,0,0.06);
  background: var(--card-bg);
  color: var(--text);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: default;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tech-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}
.tech-badge:active {
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .tech-badge {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }
}
 
/* Tech cards (component → technologies) */
.tech-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.tech-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
}
.tech-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; font-weight: 800; }
.tech-card p { font-size: 0.95rem; color: var(--accent); line-height: 1.4; }

@media (max-width: 480px) {
  .tech-cards { grid-template-columns: 1fr; }
}

/* Project gallery */
.project-hero-wrapper { display:block; width:100%; }
.project-hero { display:block; width:100%; height:auto; border-radius: 1rem; }
.project-gallery { display:flex; gap:0.6rem; margin-top:0.75rem; flex-wrap:wrap; }
.project-thumb { background: transparent; border: none; padding:0; border-radius: 8px; overflow: hidden; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.project-thumb img { display:block; width:120px; height:70px; object-fit:cover; }
.project-thumb:focus { outline: 2px solid var(--accent); }

@media (max-width: 480px) {
  .project-thumb img { width: 100px; height: 60px; }
}
/* Page Fade Transition */
.fade-in { animation: fadeInPage 0.7s ease forwards; }
@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-transition {
  opacity: 1;
  transition: opacity 0.4s ease;
}
.page-transition.fade-out {
  opacity: 0;
}
