.theme-toggle,
nav a {
  color: var(--text-secondary)
}

.hero-links a:hover,
.project-links a:hover,
.theme-toggle:hover,
body,
footer .social-links a:hover,
nav .logo,
nav a:hover {
  color: var(--text-primary)
}

.section-label,
nav .logo {
  font-family: "JetBrains Mono", monospace
}

.about-content p,
.hero-content h1 {
  margin-bottom: 1.5rem
}

.experience-item,
nav a {
  position: relative
}

.blog-item,
.btn,
.contact-item a,
.hero-links a,
.project-links a,
nav a {
  text-decoration: none
}

.contact-item a,
.hero-links a,
.project-links a,
nav a {
  transition: color .2s
}

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

:root {
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border: #e5e5e5;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #f5f5f5
}

[data-theme=dark] {
  --bg: #0a0a0a;
  --bg-secondary: #141414;
  --text-primary: #e5e5e5;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;
  --border: #262626;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --code-bg: #1a1a1a
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem
}

.education-item,
.hero-meta,
.section-header {
  margin-bottom: 3rem
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background .3s, border-color .3s
}

[data-theme=dark] nav {
  background: rgba(10, 10, 10, .9)
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem
}

nav .logo {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -.02em
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .3s
}

.theme-toggle:hover {
  background: var(--code-bg);
  transform: scale(1.05)
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem
}

nav a {
  font-size: .9375rem;
  font-weight: 500
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary)
}

.hero {
  padding: 10rem 2rem 6rem
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: stretch
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between
}

.profile-image-container {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  padding-top: .5rem
}

.profile-image {
  width: 100%;
  max-width: 450px;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--border);
  transition: transform .3s, border-color .3s, filter .3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  filter: grayscale(0%)
}

[data-theme=dark] .profile-image {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  filter: grayscale(100%)
}

.profile-image:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .15)
}

[data-theme=dark] .profile-image:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5)
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1
}

.hero-links a,
.hero-meta {
  color: var(--text-secondary);
  font-size: .9375rem;
  display: flex
}

.hero-content .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 600px
}

.hero-meta {
  gap: 2rem
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: .5rem
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  align-items: center
}

.hero-links a {
  align-items: center;
  gap: .5rem
}

.hero-links .primary-link {
  color: var(--accent);
  font-weight: 500
}

.hero-links .primary-link:hover {
  color: var(--accent-hover)
}

section {
  padding: 4rem 2rem;
  border-top: 1px solid var(--border)
}

.section-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  margin-bottom: .75rem
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .75rem
}

.section-description {
  color: var(--text-secondary);
  font-size: 1rem
}

.about-content {
  max-width: 700px;
  color: var(--text-secondary);
  line-height: 1.8
}

.about-content strong,
.metric-value {
  color: var(--text-primary);
  font-weight: 600
}

.experience-company,
.experience-item li,
.skill-list {
  color: var(--text-secondary)
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 4rem
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -.01em
}

.skill-list {
  font-size: .9375rem;
  line-height: 1.8
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 3rem
}

.education-header,
.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
  flex-wrap: wrap;
  gap: .5rem 2rem
}

.education-item h3,
.experience-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -.01em
}

.experience-company {
  font-size: 1rem;
  font-weight: 500
}

.experience-date,
.project-tech {
  font-size: .8125rem;
  color: var(--text-tertiary);
  font-family: "JetBrains Mono", monospace
}

.experience-date {
  white-space: nowrap
}

.experience-item ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem
}

.experience-item li,
.publications-list li {
  line-height: 1.7;
  padding-left: 1.5rem;
  position: relative
}

.experience-item li {
  font-size: .9375rem;
  margin-bottom: .75rem
}

.experience-item li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
  font-weight: 500
}

.experience-item li strong,
.publications-list strong {
  color: var(--text-primary);
  font-weight: 500
}

.projects-grid {
  display: grid;
  gap: 2.5rem
}

.project-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border)
}

.blog-item:last-child,
.project-item:last-child {
  border-bottom: none;
  padding-bottom: 0
}

.project-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .5rem;
  letter-spacing: -.01em
}

.project-tech {
  margin-bottom: 1rem
}

.metric-icon,
.project-links a,
.resume-box p {
  color: var(--text-secondary)
}

.blog-excerpt,
.education-details,
.project-description {
  color: var(--text-secondary);
  font-size: .9375rem;
  line-height: 1.7
}

.metric,
.metric-icon,
.project-links a {
  font-size: .875rem;
  display: flex
}

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

.project-links a {
  align-items: center;
  gap: .4rem
}

.project-metrics {
  display: flex;
  flex-direction: column;
  gap: .75rem
}

.metric {
  align-items: center;
  gap: .75rem
}

.btn,
.metric-icon {
  align-items: center
}

.metric-icon {
  width: 32px;
  height: 32px;
  background: var(--code-bg);
  border-radius: 6px;
  justify-content: center
}

.metric-label {
  color: var(--text-tertiary);
  font-size: .8125rem
}

.resume-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center
}

.resume-box h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .75rem;
  letter-spacing: -.01em
}

.btn,
.resume-box p {
  font-size: .9375rem
}

.resume-box p {
  margin-bottom: 2rem
}

.btn {
  display: inline-flex;
  gap: .5rem;
  padding: .75rem 1.5rem;
  background: var(--text-primary);
  color: var(--bg);
  font-weight: 500;
  border-radius: 6px;
  transition: transform .2s, background .2s;
  border: none;
  cursor: pointer
}

.blog-item,
.blog-list {
  display: grid;
  gap: 2rem
}

.btn:hover {
  background: var(--text-secondary);
  transform: translateY(-1px)
}

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

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--text-primary)
}

.blog-item {
  grid-template-columns: 1fr 3fr;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: opacity .2s
}

.blog-date,
.blog-link {
  color: var(--text-tertiary)
}

.blog-item:hover {
  opacity: .7
}

.blog-date {
  font-family: "JetBrains Mono", monospace;
  font-size: .8125rem
}

.blog-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: .5rem;
  letter-spacing: -.01em
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
  font-size: .875rem
}

.education-degree {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: .5rem
}

.publications-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem
}

.publications-list li {
  color: var(--text-secondary);
  font-size: .9375rem;
  margin-bottom: 1rem
}

.contact-item h3,
footer p {
  color: var(--text-tertiary);
  font-size: .875rem
}

.publications-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--text-tertiary)
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem
}

.contact-item h3 {
  font-weight: 600;
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .05em
}

.contact-item a {
  color: var(--text-primary);
  font-size: 1rem
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center
}

footer .social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem
}

footer .social-links a {
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: color .2s
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.fade-in {
  animation: .6s forwards fadeIn;
  opacity: 0
}

@media (max-width:768px) {

  .blog-item,
  .hero-layout,
  .skills-grid {
    grid-template-columns: 1fr
  }

  .container {
    padding: 0 1.5rem
  }

  nav ul {
    display: none
  }

  .theme-toggle {
    margin-left: auto
  }

  .hero {
    padding: 8rem 1.5rem 4rem
  }

  .hero-layout {
    gap: 2rem;
    align-items: center
  }

  .hero-content {
    justify-content: flex-start
  }

  .profile-image-container {
    order: -1;
    align-items: center;
    justify-content: center
  }

  .profile-image {
    max-width: 250px;
    height: auto
  }

  .hero-content h1 {
    font-size: 2.5rem
  }

  .hero-content .subtitle {
    font-size: 1.125rem
  }

  .hero-meta {
    flex-direction: column;
    gap: .5rem
  }

  section {
    padding: 3rem 1.5rem
  }

  .section-title {
    font-size: 1.75rem
  }

  .skills-grid {
    gap: 2rem
  }

  .contact-grid,
  .project-item {
    grid-template-columns: 1fr;
    gap: 1.5rem
  }

  .blog-item {
    gap: .75rem
  }
}

@media print {

  footer,
  nav {
    display: none
  }

  section {
    page-break-inside: avoid
  }
}