@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root,
[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8ed;
  --text-muted: #8b8b9e;
  --accent: #7c5cff;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --gradient: linear-gradient(135deg, #7c5cff 0%, #c084fc 50%, #f472b6 100%);
  --nav-bg: rgba(10, 10, 15, 0.75);
  --glow-1: rgba(124, 92, 255, 0.15);
  --glow-2: rgba(244, 114, 182, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-card: #ffffff;
  --bg-elevated: #eef1f8;
  --border: rgba(15, 23, 42, 0.1);
  --text: #12121f;
  --text-muted: #5b6178;
  --accent: #6d4ce6;
  --accent-light: #7c5cff;
  --accent-glow: rgba(109, 76, 230, 0.25);
  --gradient: linear-gradient(135deg, #6d4ce6 0%, #a855f7 50%, #ec4899 100%);
  --nav-bg: rgba(244, 246, 251, 0.85);
  --glow-1: rgba(109, 76, 230, 0.1);
  --glow-2: rgba(236, 72, 153, 0.06);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--glow-1), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, var(--glow-2), transparent);
  pointer-events: none;
  z-index: -1;
  transition: background 0.3s ease;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo {
  flex-shrink: 0;
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-list a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--text);
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.theme-toggle,
.nav-toggle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent-light);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 12px var(--accent-glow);
}

.theme-toggle:hover,
.nav-toggle:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-toggle {
  display: none;
  font-size: 1.2rem;
}

/* Hero */
.header {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.hero {
  max-width: 720px;
}

.hero .greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hero-summary {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.hero .roles {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--accent-light);
  margin-bottom: 1rem;
  min-height: 2rem;
  font-weight: 600;
}

.hero .roles span {
  color: var(--text);
  font-weight: 600;
}

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

@keyframes blink {
  50% { opacity: 0; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  margin-left: 1rem;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.social-icons a:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-title p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

.section-title .line {
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 4px;
  margin: 1rem auto 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image .avatar {
  width: 280px;
  height: 280px;
  border-radius: var(--radius);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow);
}

.about-image::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius) + 3px);
  background: var(--gradient);
  z-index: -1;
  opacity: 0.4;
}

.about-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.about-content h3 span {
  color: var(--accent-light);
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tag {
  padding: 0.4rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.publication {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.publication > i {
  color: var(--accent-light);
  font-size: 1.25rem;
  margin-top: 0.2rem;
}

.publication strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.publication p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.inline-link {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: var(--text);
}

/* Experience */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
}

.timeline-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 3px;
  background: var(--gradient);
  border-radius: 3px;
}

.timeline-card:hover {
  border-color: rgba(124, 92, 255, 0.35);
  transform: translateX(4px);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
}

.timeline-location {
  font-size: 0.8rem;
  padding: 0.2rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
}

.timeline-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.timeline-company {
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.timeline-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

/* Projects */
.project-group {
  margin-bottom: 3rem;
}

.project-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-group-title i {
  color: var(--accent-light);
}

.project-group-note {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: rgba(244, 114, 182, 0.12);
  color: #f472b6;
  border-radius: 50px;
  margin-left: 0.25rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  height: 100%;
}

.project-card-static {
  cursor: default;
}

.project-card-static:hover {
  border-color: rgba(124, 92, 255, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

a.project-card:hover {
  border-color: rgba(124, 92, 255, 0.45);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-header > i {
  color: var(--accent-light);
  font-size: 1.25rem;
}

.project-lang,
.project-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-light);
  border-radius: 50px;
}

.project-badge-live {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

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

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--text);
}

.project-link-secondary {
  color: var(--text-muted);
}

.project-link-secondary:hover {
  color: var(--accent-light);
}

.project-link-muted {
  color: var(--text-muted);
  font-weight: 500;
  cursor: default;
}

a.project-card:hover .project-link i.fa-arrow-right {
  transform: translateX(4px);
}

.project-link i {
  transition: transform var(--transition);
  font-size: 0.75rem;
}

.projects-cta {
  text-align: center;
  margin-top: 2.5rem;
}

.projects-cta .btn {
  display: inline-flex;
}

/* Skills */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.skill-category {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skill-category h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3 i {
  color: var(--accent-light);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-chip {
  padding: 0.45rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.edu-block {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 3rem;
}

.edu-block-full {
  width: 100%;
}

.edu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.edu-block h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edu-block h3 i {
  color: var(--accent-light);
}

.edu-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.edu-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.certs-section {
  margin-top: 1rem;
}

.certs-heading {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.certs-heading i {
  color: var(--accent-light);
}

.certs-subheading {
  font-size: 0.9rem;
  color: var(--accent-light);
  margin-bottom: 2rem;
  font-weight: 500;
}

.cert-group {
  margin-bottom: 2.5rem;
}

.cert-group-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cert-group-title i {
  color: var(--accent-light);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.cert-card:hover {
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.cert-card-static {
  cursor: default;
}

.cert-card-static:hover {
  transform: none;
}

.cert-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

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

.cert-id {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  word-break: break-all;
}

.cert-verify {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cert-card:hover .cert-verify {
  color: var(--text);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.contact-item:hover {
  border-color: rgba(124, 92, 255, 0.3);
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent-light);
}

.contact-item h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-item span,
.contact-item a {
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--accent-light);
}

.contact-form {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-form h3 {
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  margin-bottom: 1rem;
}

.form-row input {
  margin-bottom: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form .btn {
  width: 100%;
  justify-content: center;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer span {
  color: var(--accent-light);
}

/* Responsive */
@media (max-width: 900px) {
  .about-grid,
  .edu-row,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    justify-self: center;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .theme-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 80vw);
    height: 100vh;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    transition: right var(--transition);
    gap: 1.5rem;
    z-index: 99;
  }

  .nav-list.open {
    right: 0;
  }

  .btn-outline {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
