:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --heading: #e6edf3;
  --accent: #22d3ee;
  --accent-hover: #67e8f9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--heading);
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--heading);
}

/* HERO */
#hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}

#hero::before,
#hero::after {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.22;
  z-index: 0;
  pointer-events: none;
}

#hero::before {
  background: var(--accent);
  top: -140px;
  left: -120px;
  animation: heroBlobA 16s ease-in-out infinite;
}

#hero::after {
  background: #3b82f6;
  bottom: -160px;
  right: -100px;
  animation: heroBlobB 20s ease-in-out infinite;
}

@keyframes heroBlobA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(70px, 50px); }
}

@keyframes heroBlobB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-60px, -40px); }
}

@media (prefers-reduced-motion: reduce) {
  #hero::before,
  #hero::after {
    animation: none;
  }
}

.hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 64px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.25);
}

.hero-greeting {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.hero-name {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
}

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

.typed-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-edu {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 12px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent);
  color: #0d1117;
}

.btn-primary:hover {
  background-color: hsl(var(--hue, 190) 85% 58%);
  color: #0d1117;
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: hsl(var(--hue, 190) 85% 60%);
  color: hsl(var(--hue, 190) 85% 65%);
}

/* SECTIONS */
section {
  padding: 80px 24px;
}

section:nth-of-type(even) {
  background-color: var(--bg-card);
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.section-title:hover {
  color: hsl(var(--hue, 190) 85% 65%);
  border-color: hsl(var(--hue, 190) 85% 60% / 0.5);
}

/* PROJECTS GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background-color: rgba(22, 27, 34, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: hsl(var(--hue, 190) 85% 60%);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 24px hsl(var(--hue, 190) 85% 60% / 0.18);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  font-size: 1.5rem;
}

.card-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--bg-card);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  transition: color 0.2s;
}

.card:hover h3 {
  color: hsl(var(--hue, 190) 85% 68%);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span {
  font-size: 0.75rem;
  color: var(--accent);
  background-color: rgba(34, 211, 238, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 4px;
  transition: color 0.2s;
}

.card-link:hover {
  color: hsl(var(--hue, 190) 85% 65%);
}

/* TIMELINE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 28px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.timeline-company {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.timeline-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 12px;
  transition: color 0.2s;
}

.timeline-item:hover .timeline-role,
.edu-item:hover .timeline-role {
  color: hsl(var(--hue, 190) 85% 65%);
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 16px;
  position: relative;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* EDUCATION */
.edu-item {
  border-left: 2px solid var(--border);
  padding-left: 28px;
  position: relative;
}

.edu-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.edu-detail {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.skills-card {
  background-color: rgba(22, 27, 34, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.skills-card:hover {
  border-color: hsl(var(--hue, 190) 85% 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 24px hsl(var(--hue, 190) 85% 60% / 0.15);
}

.skills-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 16px;
  transition: color 0.2s;
}

.skills-card:hover h3 {
  color: hsl(var(--hue, 190) 85% 68%);
}

.skills-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.skills-card li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* CONTACT */
.contact-inner {
  text-align: center;
}

.contact-inner .section-title {
  border-bottom: none;
  margin-bottom: 16px;
}

.contact-sub {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 36px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* FOOTER */
footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.projects-grid .card:nth-child(1) { transition-delay: 0s; }
.projects-grid .card:nth-child(2) { transition-delay: 0.08s; }
.projects-grid .card:nth-child(3) { transition-delay: 0.16s; }
.projects-grid .card:nth-child(4) { transition-delay: 0.24s; }

.skills-grid .skills-card:nth-child(1) { transition-delay: 0s; }
.skills-grid .skills-card:nth-child(2) { transition-delay: 0.1s; }
.skills-grid .skills-card:nth-child(3) { transition-delay: 0.2s; }

.timeline .timeline-item:nth-child(1) { transition-delay: 0s; }
.timeline .timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline .timeline-item:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .hero-inner {
    flex-direction: column-reverse;
    gap: 32px;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-name {
    font-size: 2.4rem;
  }

  .hero-title {
    font-size: 1rem;
  }

  .nav-links {
    gap: 16px;
  }

  .timeline-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
