/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
  --bg: #fafafa;
  --bg-secondary: #f2f2f2;
  --text-primary: #111;
  --text-secondary: #555;
  --text-tertiary: #999;
  --border: #e2e2e2;
  --card-bg: #fff;
  --card-hover: #f8f8f8;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --accent-subtle: rgba(37, 99, 235, 0.06);
  --tag-bg: #f3f4f6;
  --tag-text: #555;
  --nav-bg: rgba(250, 250, 250, 0.88);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.08);
  --gradient-border: linear-gradient(135deg,
    #d97706, #e5a04e, #2dd4bf, #6ee7b7,
    #60a5fa, #67c9f0, #f0abbc, #f9a8d4,
    #e8955a, #e5a04e, #d97706, #e5a04e);
}

[data-theme="dark"] {
  --bg: #0f0f10;
  --bg-secondary: #18181a;
  --text-primary: #ececec;
  --text-secondary: #a0a0a0;
  --text-tertiary: #5a5a5a;
  --border: #252528;
  --card-bg: #18181a;
  --card-hover: #1f1f22;
  --accent: #60a5fa;
  --accent-light: #1e293b;
  --accent-subtle: rgba(96, 165, 250, 0.08);
  --tag-bg: #1e1e22;
  --tag-text: #a0a0a0;
  --nav-bg: rgba(15, 15, 16, 0.88);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.3);
  --gradient-border: linear-gradient(135deg,
    #fbbf24, #fcd34d, #5eead4, #6ee7b7,
    #93c5fd, #7dd3fc, #f9a8d4, #fda4af,
    #fdba74, #fcd34d, #fbbf24, #fcd34d);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.3s ease;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.75;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============================================
   Typography
   ============================================ */
h1, h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  margin-bottom: 0.5rem;
}

h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.handwritten {
  font-family: 'Caveat', cursive;
  font-weight: 600;
}

.accent {
  color: var(--accent);
}

/* ============================================
   Layout
   ============================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: 64px;
  display: flex;
  justify-content: center;
}

.content-wrapper {
  width: 100%;
  max-width: 640px;
  padding: 4rem 1.5rem 3rem;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  z-index: 100;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
}

.sidebar .nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.sidebar .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  opacity: 1;
}

.sidebar .nav-link.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.sidebar-spacer {
  flex: 1;
  max-height: 2rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Mobile Navigation
   ============================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.6rem;
  color: var(--text-tertiary);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-nav .nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.mobile-nav .nav-link.active {
  color: var(--text-primary);
}

.mobile-nav .theme-toggle {
  width: 34px;
  height: 34px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 1rem 0 0;
}

.greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.greeting .wave {
  display: inline-block;
  animation: wave-hand 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
  font-size: 1.3rem;
}

@keyframes wave-hand {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60%, 100% { transform: rotate(0deg); }
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero h1 .accent {
  background: linear-gradient(135deg,
    #9a3412, #b45309,
    #0f766e, #047857,
    #1e3a8a, #0369a1,
    #9d174d, #be123c,
    #c2410c, #b45309,
    #9a3412, #b45309
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 12s ease-in-out infinite;
}

[data-theme="dark"] .hero h1 .accent {
  background: linear-gradient(135deg,
    #fb923c, #fbbf24,
    #2dd4bf, #34d399,
    #60a5fa, #22d3ee,
    #f472b6, #fb7185,
    #fb923c, #fcd34d,
    #fb923c, #fbbf24
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 12s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 50% 100%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

.hero-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-body p {
  max-width: 560px;
}

.hero-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-light);
  font-weight: 500;
}

.hero-body a:hover {
  text-decoration-color: var(--accent);
  opacity: 1;
}

/* ============================================
   CTA Row
   ============================================ */
.cta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary svg {
  width: 15px;
  height: 15px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-tertiary);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.social-btn:hover {
  color: var(--text-primary);
  opacity: 1;
}

.social-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Resume Pill & Status Badge
   ============================================ */
.resume-status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.resume-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--card-bg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.resume-pill:hover {
  box-shadow: var(--shadow);
}

.resume-pill-label {
  margin-right: 0.1rem;
}

.resume-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  color: #d44638;
  transition: background 0.15s ease;
}

.resume-pill-link:hover {
  background: var(--bg-secondary);
  opacity: 1;
}

.resume-pill-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ============================================
   Animated Gradient Border
   ============================================ */
.project-row,
.project-card,
.resume-pill,
.tech-strip .tech-chip,
.company-chip,
.social-btn,
.form-group input,
.form-group textarea {
  position: relative;
}

.project-row::before,
.project-card::before,
.resume-pill::before,
.company-chip::before,
.social-btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-border);
  background-size: 300% 300%;
  animation: gradient-shift 12s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
}

.project-row:hover::before,
.project-card:hover::before,
.resume-pill:hover::before,
.company-chip:hover::before,
.social-btn:hover::before {
  opacity: 1;
}

.project-row:hover,
.project-card:hover,
.resume-pill:hover,
.company-chip:hover,
.social-btn:hover {
  border-color: transparent;
}

/* Sidebar active gradient indicator */
.sidebar .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient-border);
  background-size: 300% 300%;
  animation: gradient-shift 12s ease-in-out infinite;
}

.sidebar .nav-link {
  position: relative;
}

/* Mobile nav active gradient underline */
.mobile-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--gradient-border);
  background-size: 300% 300%;
  animation: gradient-shift 12s ease-in-out infinite;
}

.mobile-nav .nav-link {
  position: relative;
}

/* Tech chip gradient hover */
.tech-strip .tech-chip::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-border);
  background-size: 300% 300%;
  animation: gradient-shift 12s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}

.tech-strip .tech-chip:hover::before {
  opacity: 1;
}

.tech-strip .tech-chip:hover {
  border-color: transparent;
}

/* ============================================
   Section Utilities
   ============================================ */
.section {
  margin-bottom: 3.5rem;
}

.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.section-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* ============================================
   Project Cards (horizontal)
   ============================================ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  text-decoration: none;
  color: var(--text-primary);
}

.project-row:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  opacity: 1;
}

.project-row-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.project-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.project-row-content {
  flex: 1;
  min-width: 0;
}

.project-row-content h3 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.project-row-content p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-row-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.project-row-arrow {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.project-row:hover .project-row-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.project-row-arrow svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Work Page - Detailed Project Cards
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all 0.25s ease;
  text-decoration: none;
  color: var(--text-primary);
  word-break: break-word;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  opacity: 1;
}

.project-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.project-card .project-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-card .project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.project-card .project-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.project-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.project-card .project-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.project-card .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.25rem 0.55rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.project-card .tag:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.project-card .tag .tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================
   Tech Summary Strip (Work Page)
   ============================================ */
.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.tech-strip .tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.tech-strip .tech-chip:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tech-strip .tech-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================
   Companies Strip
   ============================================ */
.companies-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.company-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.company-chip:hover {
  border-color: transparent;
}

.company-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.company-chip-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.company-chip-text {
  display: flex;
  flex-direction: column;
}

.company-chip-text .co-name {
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
}

.company-chip-text .co-role {
  font-size: 0.65rem;
  color: var(--text-tertiary);
}

/* ============================================
   Tech Stack
   ============================================ */
.techstack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.techstack-category h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.6rem;
}

.techstack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 7px;
  background: var(--tag-bg);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.tech-pill:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.tech-pill-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ============================================
   Experience
   ============================================ */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.experience-item {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.experience-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.experience-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  min-width: 120px;
  padding-top: 0.15rem;
}

.experience-content h3 {
  margin-bottom: 0.1rem;
}

.experience-content .company {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.experience-content p {
  font-size: 0.85rem;
  line-height: 1.7;
}

/* ============================================
   Skills
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.skill-category h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.6rem;
}

.skill-category ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-category li {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   Contact
   ============================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-row .form-group { flex: 1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: transparent;
  outline: none;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    var(--gradient-border) border-box;
  background-size: auto, 300% 300%;
  animation: gradient-shift 12s ease-in-out infinite;
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.submit-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ============================================
   About
   ============================================ */
.about-photo {
  width: 100%;
  max-width: 380px;
  border-radius: 14px;
  margin: 1.5rem 0;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.about-content p {
  max-width: 580px;
}

/* ============================================
   Contact Info
   ============================================ */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ============================================
   Blur-in Scroll Animation
   ============================================ */
.blur-in {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(10px);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}

.blur-in.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.blur-in:nth-child(2) { transition-delay: 0.06s; }
.blur-in:nth-child(3) { transition-delay: 0.12s; }
.blur-in:nth-child(4) { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .blur-in { opacity: 1; filter: none; transform: none; transition: none; }
  .greeting .wave { animation: none; }
}

/* ============================================
   Project Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2rem;
  position: relative;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}

.modal-panel::-webkit-scrollbar {
  display: none;
}

.modal-overlay.active .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.modal-links {
  display: flex;
  gap: 0.75rem;
}

.modal-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.modal-links a:hover {
  opacity: 0.8;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-section h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal-section p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.modal-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-section ul li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 1.1rem;
  position: relative;
}

.modal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.modal-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.25rem 0.55rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 6px;
}

/* Professional project modal */
.modal-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}

.modal-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.modal-tech-category h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.4rem;
}

.modal-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .main-content { margin-left: 0; }
  .content-wrapper { padding: 2rem 1.25rem 5rem; }

  /* Typography */
  h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  h2 { font-size: clamp(1.2rem, 4vw, 1.5rem); }

  /* Hero */
  .hero { padding: 0.5rem 0 0; }
  .hero-body { margin-bottom: 1.25rem; }
  .greeting { font-size: 1rem; }

  /* CTA row */
  .cta-row { gap: 0.4rem; }
  .btn-primary { padding: 0.5rem 1rem; font-size: 0.825rem; }
  .social-btn { width: 36px; height: 36px; }

  /* Project rows (home page) */
  .project-row { padding: 0.75rem 1rem; gap: 0.75rem; }
  .project-row-icon { width: 38px; height: 38px; border-radius: 10px; }
  .project-row-icon svg { width: 18px; height: 18px; }
  .project-row-content h3 { font-size: 0.85rem; }
  .project-row-content h3 span { display: none; }
  .project-row-content p {
    font-size: 0.72rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .project-row-year { font-size: 0.6rem; }
  .project-row-arrow svg { width: 14px; height: 14px; }

  /* Project cards (work page) */
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { padding: 1.25rem; }
  .project-card .project-icon { width: 36px; height: 36px; }
  .project-card h3 { font-size: 0.9rem; }
  .project-card .project-desc { font-size: 0.8rem; }
  .project-card .project-tags { gap: 0.3rem; }
  .project-card .tag { font-size: 0.6rem; padding: 0.2rem 0.45rem; }
  .project-card .tag .tag-dot { width: 5px; height: 5px; }

  /* Tech strip */
  .tech-strip { gap: 0.3rem; }
  .tech-strip .tech-chip { font-size: 0.65rem; padding: 0.25rem 0.5rem; }
  .tech-strip .tech-chip-dot { width: 6px; height: 6px; }

  /* Tech stack grid */
  .techstack-grid { grid-template-columns: 1fr; }
  .tech-pill { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
  .tech-pill-icon { width: 12px; height: 12px; font-size: 0.45rem; }

  /* Companies */
  .companies-row { gap: 0.5rem; }
  .company-chip { padding: 0.4rem 0.7rem; gap: 0.4rem; }
  .company-chip-icon { width: 24px; height: 24px; font-size: 0.6rem; }
  .company-chip-text .co-name { font-size: 0.75rem; }
  .company-chip-text .co-role { font-size: 0.6rem; }

  /* Experience */
  .experience-item { flex-direction: column; gap: 0.4rem; }
  .experience-date { min-width: auto; font-size: 0.7rem; }
  .experience-content h3 { font-size: 0.9rem; }
  .experience-content .company { font-size: 0.8rem; }
  .experience-content p { font-size: 0.8rem; }

  /* Skills */
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .skill-category li { font-size: 0.8rem; }

  /* Resume pill & status */
  .resume-status-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .resume-pill { font-size: 0.8rem; padding: 0.35rem 0.75rem 0.35rem 0.85rem; }
  .status-badge { font-size: 0.8rem; }

  /* Contact */
  .form-row { flex-direction: column; }
  .form-group input, .form-group textarea { font-size: 16px; }
  .contact-info p { font-size: 0.8rem; }
  .social-links { gap: 0.4rem; }

  /* About */
  .about-photo { max-width: 100%; }
  .about-content p { font-size: 0.875rem; }

  /* Footer */
  .footer { flex-direction: column; gap: 0.4rem; text-align: center; }

  /* Section spacing */
  .section { margin-bottom: 2.5rem; }
  .section-divider { margin: 2rem 0; }
  .section-eyebrow { font-size: 0.65rem; }

  /* Modal */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-panel {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 18px 18px 0 0;
    padding: 1.5rem;
    transform: translateY(100%);
  }
  .modal-overlay.active .modal-panel {
    transform: translateY(0);
  }
  .modal-icon { width: 40px; height: 40px; }
  .modal-title { font-size: 1.1rem; }
  .modal-section p { font-size: 0.825rem; }
  .modal-section ul li { font-size: 0.8rem; }
  .modal-tech-grid { grid-template-columns: 1fr; }
}

/* Small phones */
@media (max-width: 380px) {
  .content-wrapper { padding: 1.5rem 1rem 5rem; }
  h1 { font-size: 1.5rem; }
  .project-row { padding: 0.65rem 0.75rem; gap: 0.6rem; }
  .project-row-icon { width: 34px; height: 34px; }
  .project-row-year { display: none; }
  .companies-row { flex-direction: column; }
  .company-chip { width: 100%; }
  .skills-grid { grid-template-columns: 1fr; }
  .cta-row { flex-wrap: wrap; }
}
