:root {
  --radius: 0.875rem;
  --background: oklch(0.13 0.03 264);
  --foreground: oklch(0.97 0.01 250);
  --card: oklch(0.18 0.035 265 / 0.6);
  --card-foreground: oklch(0.97 0.01 250);
  --popover: oklch(0.16 0.03 265);
  --popover-foreground: oklch(0.97 0.01 250);
  --primary: oklch(0.78 0.18 200);
  --primary-foreground: oklch(0.12 0.04 264);
  --secondary: oklch(0.65 0.22 295);
  --secondary-foreground: oklch(0.97 0.01 250);
  --muted: oklch(0.22 0.03 265);
  --muted-foreground: oklch(0.72 0.03 255);
  --accent: oklch(0.7 0.2 320);
  --accent-foreground: oklch(0.97 0.01 250);
  --destructive: oklch(0.65 0.24 22);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.97 0.01 250 / 0.1);
  --input: oklch(0.97 0.01 250 / 0.15);
  --ring: oklch(0.78 0.18 200);
  --gradient-primary: linear-gradient(135deg, oklch(0.78 0.18 200), oklch(0.65 0.22 295), oklch(0.7 0.2 320));
  --gradient-glow: radial-gradient(circle at 50% 50%, oklch(0.78 0.18 200 / 0.4), transparent 70%);
  --shadow-glow: 0 0 40px oklch(0.78 0.18 200 / 0.35);
  --shadow-card: 0 8px 32px oklch(0 0 0 / 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse at 20% 0%, oklch(0.78 0.18 200 / 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 30%, oklch(0.65 0.22 295 / 0.15), transparent 50%),
    radial-gradient(ellipse at 50% 100%, oklch(0.7 0.2 320 / 0.1), transparent 50%);
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

p { margin: 0; }

.container {
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 7rem 0;
}

.text-foreground { color: var(--foreground); }
.text-muted { color: var(--muted-foreground); }
.gradient-text {
  background: var(--gradient-primary);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 8s ease infinite;
}
.gradient-bg {
  background: var(--gradient-primary);
  background-size: 200% 200%;
}
.glass {
  background: oklch(0.18 0.035 265 / 0.4);
  border: 1px solid oklch(0.97 0.01 250 / 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
}
.site-header.scrolled {
  background: oklch(0.15 0.03 264 / 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.75rem;
  padding: 0.2rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.2s ease;
}
.nav-links a:hover { color: var(--foreground); }
.nav-links a:hover::after { width: 100%; }

.mobile-menu {
  display: none;
  margin: 0 1.5rem 0.5rem;
  border-radius: 1rem;
  padding: 1.5rem;
}
.mobile-menu.open { display: block; }
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted-foreground);
}
.mobile-menu a:hover { color: var(--foreground); }

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.menu-toggle .menu-close { display: none; }
.menu-toggle.open .menu-open { display: none; }
.menu-toggle.open .menu-close { display: block; }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 5rem;
}
.hero-bg,
.grid-pattern,
.hero-overlay {
  position: absolute;
  inset: 0;
}
.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}
.grid-pattern {
  z-index: 1;
  background-image:
    linear-gradient(oklch(0.97 0.01 250 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.97 0.01 250 / 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}
.hero-overlay {
  z-index: 2;
  background: linear-gradient(to bottom, rgba(13, 14, 28, 0.5), rgba(13, 14, 28, 0.3), rgba(13, 14, 28, 1));
}
.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 4rem;
}
.hero-copy {
  max-width: 42rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}
.status-dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 15px rgba(120,190,255,0.9);
  animation: pulse 1.2s ease-in-out infinite;
}
.hero-copy h1 {
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 1.05;
  font-weight: 700;
}
.role-line {
  margin-top: 1rem;
  font-size: clamp(1.5rem, 2vw, 2.3rem);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 3rem;
}
.typed-text {
  display: inline-block;
  min-width: 14ch;
}
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 2rem;
  background: var(--primary);
  margin-left: 0.25rem;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
.hero-description {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}
.cta-row {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.8rem;
  overflow-x: auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 3rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--gradient-primary);
  color: var(--primary-foreground);
  box-shadow: 0 0 40px rgba(120,190,255,0.35);
}
.btn-secondary {
  color: var(--foreground);
}
.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
.portrait-wrap {
  position: relative;
  width: min(27rem, 100%);
  aspect-ratio: 1;
  margin-left: auto;
}
.glow-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient-glow);
}
.portrait-frame {
  position: absolute;
  inset: 2rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(120,190,255,0.25), 0 0 120px rgba(170,125,255,0.15);
  animation: float 6s ease-in-out infinite;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(-50%);
  color: var(--muted-foreground);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.section-heading {
  margin-bottom: 4rem;
  max-width: 42rem;
}
.section-heading h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 600;
}
.subtitle {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  line-height: 1.8;
}

.about-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
}
.about-grid {
  grid-template-columns: 1.5fr 1fr;
  align-items: start;
}
.about-copy {
  display: grid;
  gap: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--muted-foreground);
}
.stack-card {
  padding: 1.5rem;
  border-radius: 1.5rem;
}
.stack-card h3 {
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.chip-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--foreground);
}
.chip-list.small span {
  font-size: 0.72rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}
.skill-card {
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120,190,255,0.45);
  box-shadow: 0 0 40px rgba(120,190,255,0.15);
}
.skill-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.skill-icon {
  font-size: 1.75rem;
}
.skill-card h3 {
  font-size: 1.25rem;
}
.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.skill-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.9);
}
.progress {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.project-card {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 21rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120,190,255,0.45);
  box-shadow: 0 0 40px rgba(120,190,255,0.12);
}
.project-glow {
  position: absolute;
  top: -5rem;
  right: -5rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.6;
}
.accent-cyan { background: rgba(56,189,248,0.35); }
.accent-purple { background: rgba(168,85,247,0.35); }
.accent-pink { background: rgba(236,72,153,0.35); }
.project-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  color: var(--muted-foreground);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem;
}
.project-meta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  transition: transform 0.2s ease;
}
.project-meta a:hover { transform: rotate(45deg); }
.project-meta svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.project-card h3 {
  margin-bottom: 0.9rem;
  font-size: 1.5rem;
}
.project-card p {
  margin-bottom: 1.6rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary), transparent);
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 1rem;
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.dot {
  position: absolute;
  left: -1.7rem;
  top: 2rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 20px rgba(120,190,255,0.5);
}
.timeline-content {
  width: 100%;
}
.timeline-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.timeline-kind {
  color: var(--primary);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}
.timeline-meta {
  color: var(--muted-foreground);
  font-size: 0.72rem;
}
.timeline-content h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.4rem;
}
.timeline-sub {
  color: var(--primary);
  margin-bottom: 0.8rem;
}
.timeline-content p:last-child {
  color: var(--muted-foreground);
  line-height: 1.8;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  padding: 1.5rem;
  border-radius: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120,190,255,0.45);
}
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  color: var(--primary-foreground);
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(120,190,255,0.2);
}
.contact-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-icon path,
.contact-icon rect { fill: none; }
.contact-icon path[fill="currentColor"] { fill: currentColor; }
.contact-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.contact-value {
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
}
.resume-wrap {
  margin-top: 2.75rem;
  text-align: center;
}
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 0.5rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
}
.footer-inner p {
  color: var(--muted-foreground);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted-foreground);
}
.footer-links a:hover { color: var(--foreground); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fade-up 0.8s ease-out both;
}

@media (max-width: 1024px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .cta-row {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    flex-wrap: wrap;
  }
  .btn { width: 100%; }
  .section { padding: 5rem 0; }
  .hero-copy h1 { font-size: 3.2rem; }
  .role-line { font-size: 1.5rem; }
  .status-pill { letter-spacing: 0.12em; }
  .scroll-cue { display: none; }
}
