:root {
  /* Base - Light, Futuristic, Neural */
  --bg: #F3F5F9;
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #F3F5F9;

  /* Glass / Surface */
  --glass: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-hover: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
  
  /* Typography */
  --text: #1A1C23;
  --text-secondary: #525666;
  --text-tertiary: #9CA3AF;
  
  /* Brand Accents - "Neural" & Futuristic */
  /* Using a vibrant electric blue/cyan mixed with soft violet */
  --accent-primary: #3B82F6; 
  --accent-secondary: #8B5CF6;
  --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --accent-glow: 0 0 20px rgba(59, 130, 246, 0.3);

  /* Dimensions */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --content-width: 1140px;
  
  /* Fonts */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

@keyframes gradient-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.neural-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  background: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
  filter: blur(60px);
  animation: gradient-move 15s ease infinite alternate;
}

@keyframes gradient-move {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

a { color: var(--text); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--accent-primary); }

.wrap { 
  max-width: var(--content-width); 
  margin: 0 auto; 
  padding: 24px 24px 100px; 
  animation: fade-in-up 0.8s ease-out forwards;
}

/* Navigation - Floating Glass Pill */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
  
  border-radius: 999px;
  position: sticky;
  top: 24px;
  z-index: 100;
  margin-bottom: 60px;
  transition: all 0.3s ease;
}

.nav:hover {
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
}

.brand img {
  height: 64px; /* Increased from 48px */
  width: auto;
  border-radius: 10px;
  /* Add a subtle drop shadow to logo */
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

.brand .name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}

.brand .name strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111;
}

.brand .name span {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
}

.navlinks {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(0,0,0,0.03);
  padding: 4px;
  border-radius: 999px;
}

.pill {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  z-index: 1;
}

.pill:hover {
  color: var(--accent-primary);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 8px;
}

/* Hero Headline - Full Width */
.hero-headline {
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 48px;
  background: linear-gradient(135deg, #111827 0%, #4B5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
  width: 100%;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center; /* Changed from stretch to center */
  margin-bottom: 120px;
}

.card {
  background: var(--glass);
  border: 1px solid white;
  border-radius: var(--radius-lg);
  padding: 40px; /* Reduced from 48px */
  
  /* Glassmorphism Logic */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--glass-shadow);
  
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hero > .card:first-child {
  height: auto; /* Changed from 100% to let it shrink */
}

/* Glowing border effect on hover */
.card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

h1 {
  font-size: 2.8rem; /* Reduced from 3.8rem */
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #111827 0%, #4B5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
}

.lead {
  font-size: 1.2rem; /* Reduced from 1.35rem */
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 48ch;
  font-weight: 400;
  line-height: 1.5;
}

.cta {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn:not(.secondary) {
  background: var(--text);
  color: #fff;
  border: none;
  box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2);
}

.btn:not(.secondary)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--accent-gradient);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:not(.secondary):hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.3);
}

.btn:not(.secondary):hover::before {
  opacity: 1; /* Reveal gradient on hover */
}

.btn.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.08);
}

.btn.secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0,0,0,0.05);
}

/* Feature Grid inside Hero */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: auto;
}

.mini {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.8);
  transition: all 0.2s ease;
}

.mini:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.03);
}

.mini strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
}

.mini span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Profile Card */
.profile {
  padding: 0;
  border: 0;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  animation: float 6s ease-in-out infinite;
  aspect-ratio: 4 / 5; /* Maintain a professional portrait ratio */
  max-height: 520px; /* Limit height to make it "shorter" */
}

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

.profile:hover img {
  transform: scale(1.03);
}

.profile .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: white;
  z-index: 2;
  backdrop-filter: blur(2px);
}

.profile .overlay strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.profile .overlay span {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  font-weight: 500;
}

/* Section Styling */
section {
  margin-bottom: 120px;
  scroll-margin-top: 140px;
}

h2 {
  font-size: 2.2rem;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #111;
}

.sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 65ch;
  line-height: 1.6;
}

/* Projects Card Design */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.project {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: var(--radius-md);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Gradient border top */
.project::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.project:hover::after {
  opacity: 1;
}

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

.tag {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s;
}

.project:hover .tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
}

.project h3 {
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.project p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  flex-grow: 1;
}

/* Layout utilities */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .profile { aspect-ratio: 4/3; min-height: auto; order: -1; } /* Photo first on mobile? */
  .grid3 { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; gap: 32px; }
  h1 { font-size: 2.8rem; }
  .hero-headline { font-size: 2.4rem; margin-bottom: 32px; }
  
  .nav {
    flex-wrap: wrap;
    border-radius: 24px;
    padding: 12px 16px;
  }
  
  .navlinks {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 16px;
    margin-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: transparent;
  }

  .navlinks.active { display: flex; }
  .pill { text-align: center; width: 100%; background: white; margin-bottom: 4px; }
  .menu-toggle { display: block; }
}
