:root {
  --primary-color: #0046bb;
  --primary-light: #4eaaff;
  --bg-light: #fff;
  --bg-dark: #111;
  --text-light: #111;
  --text-dark: #eee;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, 'Inter', 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg-light);
  color: var(--text-light);
  transition: background 0.3s, color 0.3s;
}

/* Dark Mode */
body.dark {
  background: var(--bg-dark);
  color: var(--text-dark);
}

body.dark .hero {
  background: linear-gradient(120deg, #151c34 0%, #0046bb 60%, #4eaaff 100%);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  text-decoration: underline;
}
body.dark a {
  color: var(--primary-light);
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--primary-color);
  background: var(--bg-light);
  padding: 1.2rem 2rem 1rem 2rem;
}
body.dark header {
  background: var(--bg-dark);
  border-bottom: 1.5px solid var(--primary-light);
}
.logo-title {
  display: flex;
  align-items: center;
}
.logo {
  height: 70px;
  margin-right: 1rem;
}
.site-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.1rem;
}
body.dark .site-title {
  color: var(--primary-light);
}
#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  color: inherit;
  border-radius: 6px;
  transition: background 0.2s;
}
#theme-toggle:hover, #theme-toggle:focus {
  background: rgba(70, 142, 255, 0.12);
  outline: none;
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(120deg, #0046bb 0%, #4eaaff 100%);
  color: #fff;
  border-radius: 0 0 2.2rem 2.2rem;
  overflow: hidden;
  text-align: center;
  padding: 3.2rem 0 2rem 0;
  margin-bottom: 2rem;
}
.hero > h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1.1rem;
  color: #fff;
  letter-spacing: 0.01em;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.hero strong {
  display: block;
  margin-top: 0.1em;
}
.hero em {
  font-size: 1.07em;
}
.cta {
  display: inline-block;
  margin-top: 1.2rem;
  background: #fff;
  color: #0046bb;
  padding: 0.85rem 2rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 3px 16px #0046bb25;
  transition: background 0.22s, color 0.22s;
}
.cta:hover {
  background: #4eaaff;
  color: #fff;
}

/* Decorative SVG for Hero */
.hero::after {
  content: "";
  position: absolute;
  top: -36px; right: -56px;
  width: 220px; height: 220px;
  background: url('new_logo.svg') no-repeat center/contain;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
}

/* Projects & Cards */
.projects {
  padding: 2.4rem 0 0.3rem 0;
}
.projects h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1.6rem;
  font-size: 1.55rem;
  font-weight: 700;
}
body.dark .projects h2 {
  color: var(--primary-light);
}
.project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: center;
}
.project-card {
  background: #f8faff;
  border: 1.5px solid #e0eafc;
  border-radius: 13px;
  padding: 1.3rem 1.2rem;
  width: 320px;
  min-width: 250px;
  box-shadow: 0 2px 10px #0046bb19;
  margin-bottom: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-card h3 {
  margin-top: 0;
  font-size: 1.14rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.project-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
}
.project-card h3 a:hover {
  text-decoration: underline;
}
body.dark .project-card {
  background: #181b26;
  border: 1.5px solid #4eaaff33;
  box-shadow: none;
}
body.dark .project-card h3 a {
  color: var(--primary-light);
}
.label {
  font-size: 0.92em;
  color: #555;
  font-weight: 600;
}
body.dark .label {
  color: #aad4ff;
}

/* Custom Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltiptext {
  visibility: hidden;
  min-width: 140px;
  background-color: #0046bb;
  color: #fff;
  text-align: center;
  border-radius: 7px;
  padding: 8px 7px;
  position: absolute;
  z-index: 3;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.98em;
  font-weight: 500;
  pointer-events: none;
  box-shadow: 0 2px 14px #0046bb27;
}
.tooltip:hover .tooltiptext,
.tooltip:focus-within .tooltiptext {
  visibility: visible;
  opacity: 1;
}
body.dark .tooltiptext {
  background-color: #4eaaff;
  color: #181b26;
}

/* Contact */
.contact {
  padding: 2rem 0 1.3rem 0;
}
.contact h2 {
  color: var(--primary-color);
  font-size: 1.45rem;
  text-align: center;
  margin-bottom: 1.12rem;
}
body.dark .contact h2 {
  color: var(--primary-light);
}
.contact ul {
  list-style: none;
  padding: 0;
  text-align: center;
}
.contact li {
  margin-bottom: 0.73rem;
  font-size: 1.06rem;
}
.contact li span {
  font-weight: 600;
  margin-right: 0.27rem;
}
.contact a {
  color: var(--primary-color);
}
body.dark .contact a {
  color: var(--primary-light);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.15rem 0 0.7rem 0;
  color: #666;
  border-top: 1.2px solid #e3e3e3;
  font-size: 1rem;
  margin-top: 2.2rem;
  background: none;
}
body.dark footer {
  color: #bcd2e6;
  border-top: 1.2px solid #3a3f4e;
}

/* Responsive Design */
@media (max-width: 900px) {
  .project-list {
    flex-direction: column;
    align-items: center;
  }
}
@media (max-width: 660px) {
  header, .hero, .projects, .contact, footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .site-title {
    font-size: 1.28rem;
  }
  .logo {
    height: 44px;
    margin-right: 0.7rem;
  }
  .project-card {
    width: 96vw;
    min-width: unset;
    max-width: 98vw;
  }
  .hero {
    padding: 2.1rem 0 1.19rem 0;
  }
}

/* Accessibility */
:focus-visible {
  outline: 2px solid #4eaaff;
}

header {
  display: flex;
  flex-direction: column;
  border-bottom: 1.5px solid var(--primary-color);
  background: var(--bg-light);
  padding: 1.2rem 2rem 1rem 2rem;
}

body.dark header {
  background: var(--bg-dark);
  border-bottom: 1.5px solid var(--primary-light);
}

.logo-title {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.main-nav {
  display: flex;
  gap: 1.3rem;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}

#theme-toggle {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  color: inherit;
  border-radius: 6px;
  transition: background 0.2s;
}

#theme-toggle:hover,
#theme-toggle:focus {
  background: rgba(70, 142, 255, 0.12);
  outline: none;
}

@media (max-width: 600px) {
  header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  #theme-toggle {
    align-self: center;
    margin-top: 0.5rem;
  }
}

/* Blog Post Styling */
.post {
  max-width: 720px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--bg-light, #ffffff);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
body.dark .post {
  background: #181b26;
  color: var(--text-dark);
}

.post-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--primary-color, #0046bb);
}
body.dark .post-title {
  color: var(--primary-light, #4eaaff);
}

.post-meta {
  color: #777;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
body.dark .post-meta {
  color: #bbb;
}

.post-content {
  line-height: 1.7;
  font-size: 1.05rem;
}
.post-content h2 {
  margin-top: 2rem;
  color: var(--primary-color, #0046bb);
  font-size: 1.5rem;
}
body.dark .post-content h2 {
  color: var(--primary-light, #4eaaff);
}
.post-content em {
  color: #444;
}
body.dark .post-content em {
  color: #ccc;
}
.post-content ul {
  margin-left: 1.5rem;
}
.post-content li {
  margin-bottom: 0.5rem;
}
.skills-list {
  columns: 2;
  list-style: none;
  padding: 0;
}
.skills-list li {
  margin-bottom: 0.5rem;
}
