:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --dark: #0f172a;
  --blue: #0284c7;
  --blue-dark: #0369a1;
  --cyan: #38bdf8;
  --soft: #e0f2fe;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --header: rgba(15, 23, 42, 0.96);
}

[data-theme="dark"] {
  --bg: #020617;
  --surface: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #cbd5e1;
  --dark: #f8fafc;
  --blue: #38bdf8;
  --blue-dark: #7dd3fc;
  --cyan: #7dd3fc;
  --soft: #12263a;
  --line: #243244;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --header: rgba(2, 6, 23, 0.96);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

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

img, svg {
  max-width: 100%;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: var(--header);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.navbar {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  color: #ffffff;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 900;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand span {
  color: var(--cyan);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: #e2e8f0;
  font-weight: 750;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active-link {
  color: var(--cyan);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

.theme-toggle,
.menu-toggle {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  border-radius: 14px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  font-size: 24px;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 126px 24px 80px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 54px;
}

.eyebrow,
.section-heading p,
.project-date {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--dark);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.04;
  margin-top: 10px;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--blue);
}

.hero h2 {
  color: var(--dark);
  font-size: clamp(24px, 3vw, 34px);
  margin: 12px 0 14px;
}

.hero-summary {
  color: var(--muted);
  max-width: 660px;
  font-size: 18px;
}

.hero-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 76px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.detail-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

.detail-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.status-card .detail-value,
.status-contact strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
  flex: 0 0 auto;
}

.hero-cta-row,
.about-actions,
.contact-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

.social-icon.linkedin {
  background: #0a66c2;
}

.social-icon.github {
  background: #181717;
}

[data-theme="dark"] .social-icon.github {
  background: #f8fafc;
  color: #181717;
}

.social-icon:hover {
  transform: translateY(-4px);
  filter: brightness(1.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 900;
  border: 2px solid var(--blue);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn.primary {
  background: var(--blue);
  color: #ffffff;
}

.btn.secondary {
  background: var(--surface);
  color: var(--blue);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(2, 132, 199, 0.22);
}

.resume-btn {
  min-width: 190px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.photo-card {
  width: min(390px, 90vw);
  height: 500px;
  border-radius: 34px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(56, 189, 248, 0.55);
  border-radius: 26px;
  z-index: 2;
  pointer-events: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.section,
.section-lite {
  max-width: 1180px;
  margin: 0 auto;
  padding: 92px 24px;
}

.section-heading {
  text-align: center;
  margin-bottom: 42px;
}

.section-heading h2 {
  color: var(--dark);
  font-size: clamp(32px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}

.about-text {
  padding: 34px;
}

.about-text h3 {
  color: var(--dark);
  font-size: 27px;
  margin-bottom: 14px;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
}

.cert-card {
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(160deg, #0f172a, #075985);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  box-shadow: var(--shadow);
}

.cert-card img {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.cert-card p {
  color: #bae6fd;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-card {
  background: linear-gradient(180deg, var(--card), var(--surface));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 135px;
  height: 135px;
  border-radius: 999px;
  background: var(--soft);
  opacity: 0.72;
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--cyan);
}

.skill-card span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--soft);
  border-radius: 16px;
  font-size: 25px;
  margin-bottom: 18px;
}

.skill-card h3 {
  color: var(--dark);
  font-size: 22px;
  margin-bottom: 8px;
}

.skill-card p {
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.project-showcase {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 34px;
  padding: 24px;
  margin-bottom: 28px;
  align-items: center;
}

.project-showcase.reverse {
  direction: rtl;
}

.project-showcase.reverse > * {
  direction: ltr;
}

.project-slider {
  height: 350px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--soft);
  position: relative;
  border: 1px solid var(--line);
}

.project-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.project-slider img.active {
  opacity: 1;
}

.project-info {
  padding: 12px;
}

.project-info h3 {
  color: var(--dark);
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.2;
  margin: 10px 0 12px;
}

.project-info p:not(.project-date),
.project-catalog-body p:not(.project-date) {
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 24px;
}

.project-tags span {
  background: var(--soft);
  color: var(--blue);
  border: 1px solid var(--line);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.view-all-wrap {
  text-align: center;
  margin-top: 36px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  align-items: stretch;
}

.contact-info-card {
  text-align: left;
  padding: 38px;
  background: linear-gradient(140deg, #0f172a, #075985);
  color: #ffffff;
}

.contact-info-card h3 {
  font-size: 26px;
  line-height: 1.25;
  margin: 8px 0 12px;
}

.contact-info-card p {
  color: #dbeafe;
}

.contact-detail-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transition: transform 0.25s ease, background 0.25s ease;
}

.contact-detail-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.contact-detail-item span {
  color: #bae6fd;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
}

.contact-detail-item strong {
  color: #ffffff;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.connect-heading {
  margin-top: 24px;
  color: #ffffff;
}

.contact-socials {
  margin-top: 16px;
}

.contact-form {
  padding: 34px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-row label {
  color: var(--dark);
  font-weight: 850;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.form-row textarea {
  resize: vertical;
}

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

.form-status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.projects-page-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 138px 24px 50px;
  text-align: center;
}

.projects-page-hero h1 {
  color: var(--dark);
  font-size: clamp(42px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 8px 0 14px;
}

.projects-page-hero p:not(.eyebrow) {
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto 24px;
  font-size: 18px;
}

.project-catalog {
  padding-top: 30px;
}

.project-catalog-grid {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.project-catalog-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: stretch;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-catalog-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
}

.project-catalog-card:nth-child(even) {
  grid-template-columns: 1.28fr 0.72fr;
}

.project-catalog-card:nth-child(even) img {
  order: 2;
  border-left: 1px solid var(--line);
  border-right: 0;
}

.project-catalog-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  background: var(--soft);
  border-right: 1px solid var(--line);
}

.project-catalog-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-catalog-body h2 {
  color: var(--dark);
  font-size: 22px;
  line-height: 1.25;
  margin: 8px 0 10px;
}

.project-catalog-body .btn {
  margin-top: auto;
}

.github-repo-btn {
  gap: 10px;
  width: fit-content;
}

.github-repo-btn svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.project-catalog-card .project-tags {
  margin-bottom: 20px;
}


footer {
  text-align: center;
  background: #020617;
  color: #94a3b8;
  padding: 22px;
}

@media (max-width: 1030px) {
  .hero {
    gap: 34px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero,
  .about-grid,
  .project-showcase,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    text-align: center;
  }

  .hero-summary {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-details {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-row,
  .about-actions {
    justify-content: center;
  }

  .project-showcase.reverse {
    direction: ltr;
  }

  .project-slider {
    height: 320px;
  }

  .contact-info-card {
    text-align: center;
  }

  .contact-socials {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .navbar {
    padding: 0 16px;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-controls {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .hero,
  .section,
  .section-lite {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-top: 112px;
  }

  .hero-details,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    align-items: center;
    text-align: center;
  }

  .photo-card {
    height: 430px;
  }

  .contact-form,
  .contact-info-card,
  .about-text,
  .cert-card {
    padding: 24px;
  }

  .project-catalog-card,
  .project-catalog-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .project-catalog-card:nth-child(even) img {
    order: 0;
    border-left: 0;
  }

  .project-catalog-card img {
    min-height: 220px;
    height: 230px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-catalog-body {
    padding: 24px;
  }
}


@media (max-width: 520px) {
  .brand {
    font-size: 20px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 40px;
    height: 40px;
  }

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

  .resume-btn {
    width: 100%;
  }

  .photo-card {
    height: 390px;
    border-radius: 26px;
  }

  .project-showcase {
    padding: 16px;
    border-radius: 22px;
  }

  .project-slider {
    height: 230px;
  }
}

/* Resume-aligned refinements */
.about-text .eyebrow {
  margin-bottom: 10px;
}

.about-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.about-highlight-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--soft);
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 900;
  font-size: 14px;
}

.cert-card .cert-btn {
  width: 100%;
  max-width: 280px;
  background: #ffffff;
  color: #075985;
  border-color: #ffffff;
  margin-top: 4px;
}

.cert-card .cert-btn:hover {
  background: #e0f2fe;
  border-color: #e0f2fe;
}

.resume-skills .skill-card p {
  font-weight: 650;
}

@media (max-width: 760px) {
  .about-highlight-grid {
    grid-template-columns: 1fr;
  }
}

/* Thank You Page */
.thank-you-section {
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 66px);
  padding: 142px 24px 80px;
  display: grid;
  place-items: center;
}

.thank-you-card {
  width: min(760px, 100%);
  padding: 46px;
  text-align: center;
}

.thank-you-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  border: 1px solid var(--line);
  font-size: 38px;
  font-weight: 950;
}

.thank-you-card h1 {
  color: var(--dark);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 10px 0 14px;
}

.thank-you-card p:not(.eyebrow) {
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
  font-size: 18px;
}

.thank-you-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

@media (max-width: 520px) {
  .thank-you-card {
    padding: 30px 22px;
  }

  .thank-you-actions .btn {
    width: 100%;
  }
}
