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

html {
  scroll-behavior: smooth;
}

:root {
  --bg-gradient: linear-gradient(135deg, #e4f2ff 0%, #d5eeff 38%, #ddf1f6 72%, #edf8f4 100%);
  --surface-nav: rgba(255, 255, 255, 0.85);
  --surface-card: rgba(255, 255, 255, 0.36);
  --surface-soft: rgba(255, 255, 255, 0.74);
  --border-soft: rgba(95, 160, 205, 0.42);
  --text-primary: #1b4260;
  --text-secondary: #3a6280;
  --text-accent: #1f5e88;
  --text-hero-subtitle: #3f82af;
  --text-hero-muted: #4a7393;
  --shadow-soft: 0 6px 12px rgba(79, 150, 199, 0.12);
  --hover-bg: rgba(94, 169, 133, 0.16);
  --form-bg: rgba(240, 248, 255, 0.8);
  --focus-ring: rgba(79, 150, 199, 0.45);
  --button-text: #2a638c;
  --button-primary-text: #f6fbff;
  --button-primary-bg: linear-gradient(130deg, rgba(79, 150, 199, 0.92), rgba(39, 106, 154, 0.95));
  --button-primary-bg-hover: linear-gradient(130deg, rgba(95, 163, 208, 0.94), rgba(56, 123, 171, 0.94));
  --button-secondary-bg: linear-gradient(130deg, rgba(234, 246, 255, 0.86), rgba(247, 252, 255, 0.84));
  --button-secondary-bg-hover: linear-gradient(130deg, rgba(232, 247, 240, 0.88), rgba(245, 253, 248, 0.86));

  --blue-500: #4f96c7;
  --blue-700: #1f5e88;
  --green-500: #5ea985;
  --green-600: #4a9070;
  --bg-1: #e4f2ff;
  --bg-2: #d5eeff;
  --bg-3: #ddf1f6;
  --bg-4: #edf8f4;
  --card-bg: var(--surface-card);
  --card-border: var(--border-soft);
  --text-main: var(--text-primary);
  --text-soft: var(--text-secondary);
  --shadow-base: 0 10px 28px rgba(79, 150, 199, 0.2);
  --shadow-mid: 0 22px 46px rgba(79, 150, 199, 0.12);
  --shadow-hover: 0 30px 62px rgba(79, 150, 199, 0.2), 0 14px 28px rgba(94, 169, 133, 0.15);
  --shadow-green-hover: 0 24px 48px rgba(79, 150, 199, 0.18), 0 12px 26px rgba(94, 169, 133, 0.2);
}

[data-theme="dark"] {
  --bg-gradient: linear-gradient(135deg, #10151d 0%, #131c28 38%, #172331 72%, #1b2939 100%);
  --surface-nav: rgba(19, 27, 38, 0.9);
  --surface-card: rgba(21, 31, 44, 0.72);
  --surface-soft: rgba(28, 40, 56, 0.86);
  --border-soft: rgba(101, 147, 184, 0.45);
  --text-primary: #e8eef6;
  --text-secondary: #c1cfde;
  --text-accent: #91c0e8;
  --text-hero-subtitle: #9bc4e7;
  --text-hero-muted: #b8cbde;
  --shadow-soft: 0 8px 20px rgba(2, 8, 18, 0.45);
  --hover-bg: rgba(96, 152, 196, 0.22);
  --form-bg: rgba(20, 32, 47, 0.85);
  --focus-ring: rgba(145, 192, 232, 0.5);
  --button-text: #d9e7f3;
  --button-primary-text: #f4f9ff;
  --button-primary-bg: linear-gradient(130deg, rgba(79, 150, 199, 0.86), rgba(47, 109, 154, 0.9));
  --button-primary-bg-hover: linear-gradient(130deg, rgba(98, 166, 212, 0.9), rgba(62, 126, 171, 0.92));
  --button-secondary-bg: linear-gradient(130deg, rgba(33, 48, 66, 0.9), rgba(39, 56, 76, 0.9));
  --button-secondary-bg-hover: linear-gradient(130deg, rgba(44, 62, 85, 0.92), rgba(52, 72, 97, 0.92));

  --bg-1: #10151d;
  --bg-2: #131c28;
  --bg-3: #172331;
  --bg-4: #1b2939;
  --blue-700: #91c0e8;
  --green-600: #9fd3b8;
  --shadow-base: 0 10px 30px rgba(2, 8, 18, 0.45);
  --shadow-mid: 0 18px 40px rgba(2, 8, 18, 0.35);
  --shadow-hover: 0 20px 42px rgba(2, 8, 18, 0.45), 0 10px 22px rgba(49, 89, 126, 0.24);
  --shadow-green-hover: 0 18px 34px rgba(2, 8, 18, 0.42), 0 8px 20px rgba(81, 126, 102, 0.3);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: block;
  padding: 36px 18px;
  color: var(--text-main);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-nav);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.brand-link {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-list a {
  color: var(--text-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.nav-list a:hover {
  background: var(--hover-bg);
  color: var(--text-accent);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  background: var(--hover-bg);
}

/* Theme-aware custom scrollbar */
*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--surface-soft);
}

*::-webkit-scrollbar-thumb {
  background: var(--text-accent);
  border-radius: 999px;
  border: 2px solid var(--surface-soft);
}

*::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.1);
}

/* Global keyboard navigation focus ring */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 4px;
}

.nav-list a.active {
  color: var(--text-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.scroll-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: var(--surface-nav);
  color: var(--text-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
  z-index: 1200;
}

.scroll-to-top:hover {
  background: var(--hover-bg);
}

.scroll-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.container {
  max-width: 1040px;
  width: 100%;
  padding-inline: 12px;
  display: grid;
  gap: 22px;
  margin: 18px auto 26px;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.container:hover {
  transform: translateY(-2px);
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-base), var(--shadow-mid);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-base), var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.65);
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.06) 42%,
    rgba(255, 255, 255, 0.24) 100%
  );
  opacity: 0.55;
  pointer-events: none;
}

.profile-card {
  text-align: left;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(118, 178, 220, 0.18), rgba(140, 196, 230, 0.12));
  border-color: rgba(120, 178, 220, 0.44);
}

.hero-card {
  padding: clamp(26px, 4.2vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(10px);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.hero-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 18px 36px rgba(79, 150, 199, 0.22),
    0 8px 20px rgba(94, 169, 133, 0.16);
}

.hero-card::before {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -90px;
  width: clamp(170px, 22vw, 250px);
  height: clamp(170px, 22vw, 250px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 150, 199, 0.18), rgba(94, 169, 133, 0.12) 54%, rgba(79, 150, 199, 0) 74%);
  filter: blur(12px);
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -70px;
  width: clamp(180px, 24vw, 280px);
  height: clamp(180px, 24vw, 280px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 150, 199, 0.24), rgba(94, 169, 133, 0.14) 42%, rgba(79, 150, 199, 0) 72%);
  filter: blur(10px);
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 560px;
}

.hero-copy h1 {
  font-size: clamp(2.35rem, 5.1vw, 3.85rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--blue-700);
  max-width: 560px;
}

.hero-copy h1 span {
  display: block;
  margin-top: 6px;
  color: var(--text-hero-subtitle);
}

.hero-tagline {
  margin: 0;
  max-width: 560px;
  color: var(--text-accent);
  font-weight: 700;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  letter-spacing: 0.01em;
}

.hero-value {
  margin-top: 14px;
  max-width: 540px;
  color: var(--text-hero-subtitle);
  font-size: clamp(0.98rem, 1.34vw, 1.08rem);
  font-weight: 600;
}

.hero-description {
  margin-top: 18px;
  max-width: 560px;
  font-size: clamp(0.9rem, 1.25vw, 1rem);
  color: var(--text-hero-muted);
}

.hero-trust {
  margin-top: 18px;
  font-size: clamp(0.82rem, 1.1vw, 0.92rem);
  color: var(--text-hero-muted);
  font-weight: 650;
  letter-spacing: 0.015em;
}

.hero-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(148px, 1fr));
  gap: 14px;
  max-width: 640px;
  margin-inline: 0;
}

.hero-btn {
  min-height: 48px;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-btn-primary {
  border-color: rgba(23, 106, 186, 0.9);
  background: #1f73d8;
  color: #f7fff9;
  box-shadow:
    0 12px 24px rgba(31, 115, 216, 0.3),
    0 6px 12px rgba(31, 115, 216, 0.2);
}

.hero-btn-secondary {
  border-color: rgba(104, 165, 206, 0.52);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.3), rgba(245, 252, 255, 0.2));
  color: #1f5e88;
  backdrop-filter: blur(8px);
}

.hero-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 180%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hero-btn-primary::after {
  background: radial-gradient(circle, rgba(94, 169, 133, 0.32), rgba(79, 150, 199, 0));
}

.hero-btn-secondary::after {
  background: radial-gradient(circle, rgba(94, 169, 133, 0.24), rgba(120, 182, 226, 0));
}

.hero-btn:hover::after {
  opacity: 1;
}

.hero-btn-primary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
  background: #166bc3;
  border-color: rgba(22, 107, 195, 0.95);
}

.hero-btn-secondary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-green-hover);
  background: linear-gradient(130deg, rgba(232, 247, 241, 0.58), rgba(245, 253, 250, 0.44));
  border-color: rgba(94, 169, 133, 0.48);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: clamp(180px, 24vw, 280px);
  height: clamp(180px, 24vw, 280px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 150, 199, 0.3), rgba(94, 169, 133, 0.2) 46%, rgba(79, 150, 199, 0) 74%);
  filter: blur(16px);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

.hero-visual .profile-media {
  margin: 0;
}

.hero-visual .profile-media::before {
  background: radial-gradient(circle, rgba(79, 150, 199, 0.44), rgba(94, 169, 133, 0.2), rgba(79, 150, 199, 0));
}

.skills-section {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(94, 169, 133, 0.13), rgba(130, 196, 163, 0.12));
  border-color: rgba(94, 169, 133, 0.42);
}

.projects-section {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(127, 186, 226, 0.16), rgba(205, 231, 249, 0.12));
  border-color: rgba(130, 188, 226, 0.48);
}

.links-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(134, 191, 228, 0.16), rgba(94, 169, 133, 0.08));
  border-color: rgba(130, 190, 227, 0.48);
}

.profile-media {
  position: relative;
  width: clamp(112px, 13vw, 152px);
  height: clamp(112px, 13vw, 152px);
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(67, 148, 224, 0.86), rgba(78, 184, 141, 0.86));
  box-shadow:
    0 12px 26px rgba(79, 150, 199, 0.24),
    0 6px 14px rgba(94, 169, 133, 0.2);
  margin: 0 auto 16px;
  animation: hero-float 6.2s ease-in-out infinite;
  transform: translateY(0) scale(1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-media::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(170px, 19vw, 240px);
  height: clamp(170px, 19vw, 240px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79, 150, 199, 0.3), rgba(94, 169, 133, 0.18), rgba(79, 150, 199, 0));
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(10px);
}

.profile-media:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow:
    0 18px 34px rgba(79, 150, 199, 0.3),
    0 10px 22px rgba(94, 169, 133, 0.24);
}

.profile-pic {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 10px 24px rgba(79, 150, 199, 0.24),
    0 4px 10px rgba(79, 150, 199, 0.18);
  z-index: 2;
  transform: translateY(0) scale(1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-media:hover .profile-pic {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 14px 30px rgba(79, 150, 199, 0.28),
    0 6px 14px rgba(79, 150, 199, 0.2);
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

h1,
h2,
p,
.link-button {
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: 0.06em;
  color: var(--blue-700);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

p {
  color: var(--text-soft);
  line-height: 1.65;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.intro {
  max-width: 42ch;
  margin: 0 auto;
}

.skills-section h2 {
  margin-bottom: 14px;
  color: var(--green-600);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@keyframes skill-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(0.5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.skill-pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(94, 169, 133, 0.46);
  background: rgba(232, 248, 240, 0.5);
  backdrop-filter: blur(10px);
  color: #2f6d58;
  font-size: 0.97rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 18px rgba(79, 150, 199, 0.12),
    0 4px 10px rgba(94, 169, 133, 0.16);
  transform: translateY(0) scale(1);
  animation: skill-float 4s ease-in-out infinite;
  will-change: transform;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.skill-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.38) 0%,
    rgba(255, 255, 255, 0.06) 55%,
    rgba(147, 211, 181, 0.24) 100%
  );
  pointer-events: none;
}

.skill-pill::after {
  content: "";
  position: absolute;
  top: -115%;
  left: -24%;
  width: 34%;
  height: 150%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(94, 169, 133, 0.34) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(22deg);
  transition: left 0.35s ease, top 0.35s ease;
  pointer-events: none;
}

.skill-pill:hover {
  transform: translateY(-10px) scale(1.05);
  animation-play-state: paused;
  box-shadow: var(--shadow-green-hover);
  border-color: rgba(94, 169, 133, 0.74);
  background: rgba(222, 245, 234, 0.8);
}

.skill-pill:nth-child(1) {
  animation-delay: 0s;
}

.skill-pill:nth-child(2) {
  animation-delay: 0.3s;
}

.skill-pill:nth-child(3) {
  animation-delay: 0.6s;
}

.skill-pill:nth-child(4) {
  animation-delay: 0.9s;
}

.skill-pill:nth-child(5) {
  animation-delay: 1.2s;
}

.skill-pill:nth-child(6) {
  animation-delay: 1.5s;
}

.skill-pill:nth-child(7) {
  animation-delay: 1.8s;
}

.skill-pill:hover::after {
  left: 90%;
  top: 110%;
}

.skill-pill:active {
  transform: translateY(-2px) scale(0.99);
  box-shadow:
    0 9px 16px rgba(79, 150, 199, 0.14),
    0 4px 8px rgba(94, 169, 133, 0.16);
}

.projects-section {
  position: relative;
}
#about,
#skills,
#projects,
#contact {
  scroll-margin-top: 92px;
}

.projects-section h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  margin-bottom: 16px;
  letter-spacing: 0.11em;
  color: var(--blue-700);
}

.projects-section::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -70px;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 169, 133, 0.22), rgba(94, 169, 133, 0));
  pointer-events: none;
}

.projects-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  backdrop-filter: blur(11px);
  padding: 16px;
  box-shadow:
    0 10px 22px rgba(79, 150, 199, 0.14),
    0 4px 10px rgba(79, 150, 199, 0.1);
  transform: translateY(0) scale(1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
}
.featured-project {
  border-color: rgba(113, 176, 219, 0.7);
  box-shadow:
    0 14px 28px rgba(79, 150, 199, 0.2),
    0 5px 12px rgba(79, 150, 199, 0.1);
}
.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f4fbff;
  background: linear-gradient(130deg, rgba(79, 150, 199, 0.94), rgba(42, 109, 157, 0.92));
  border: 1px solid rgba(94, 169, 133, 0.68);
  border-radius: 999px;
  padding: 4px 8px;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.36) 0%,
    rgba(255, 255, 255, 0.08) 58%,
    rgba(144, 199, 233, 0.14) 72%,
    rgba(179, 219, 244, 0.16) 100%
  );
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(94, 169, 133, 0.48);
  background: rgba(235, 247, 255, 0.72);
}

.project-card h3,
.project-card p,
.tech-tags,
.project-actions {
  position: relative;
  z-index: 1;
}

.project-card h3 {
  color: var(--blue-700);
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.project-card p {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 14px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-accent);
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
}

.project-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-button {
  position: relative;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(122, 181, 221, 0.52);
  background: linear-gradient(130deg, rgba(236, 247, 255, 0.84), rgba(246, 252, 255, 0.82));
  backdrop-filter: blur(10px);
  color: var(--button-text);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  min-height: 44px;
  box-shadow:
    0 8px 16px rgba(79, 150, 199, 0.16),
    0 3px 8px rgba(79, 150, 199, 0.11);
  transform: translateY(0) scale(1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
}
.project-button-primary {
  border-color: rgba(90, 160, 208, 0.66);
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}
.project-button-secondary {
  background: var(--button-secondary-bg);
}

.project-button::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -20%;
  width: 36%;
  height: 160%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(94, 169, 133, 0.36) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(24deg);
  transition: left 0.35s ease, top 0.35s ease;
  pointer-events: none;
}

.project-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 180%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(94, 169, 133, 0.3), rgba(79, 150, 199, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-button:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-green-hover);
  border-color: rgba(94, 169, 133, 0.58);
  background: linear-gradient(130deg, rgba(226, 244, 238, 0.9), rgba(239, 250, 246, 0.88));
}

.project-button-primary:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(94, 169, 133, 0.52);
  background: var(--button-primary-bg-hover);
}

.project-button-secondary:hover {
  border-color: rgba(94, 169, 133, 0.52);
  background: var(--button-secondary-bg-hover);
}

.project-button:hover::before {
  left: 90%;
  top: 110%;
}

.project-button:hover::after {
  opacity: 1;
}

.project-button:active {
  transform: translateY(-2px) scale(0.99);
  box-shadow:
    0 9px 16px rgba(79, 150, 199, 0.18),
    0 4px 8px rgba(79, 150, 199, 0.13);
}

.project-button:focus-visible {
  outline: 2px solid rgba(94, 169, 133, 0.74);
  outline-offset: 2px;
}

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 8px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.link-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 15px 18px;
  min-height: 44px;
  color: var(--text-accent);
  text-decoration: none;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 22px rgba(79, 150, 199, 0.14);
  transform: translateY(0) scale(1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.link-button::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -15%;
  width: 36%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(94, 169, 133, 0.34) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(24deg);
  transition: left 0.35s ease, top 0.35s ease;
  pointer-events: none;
}

.link-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 165%;
  height: 165%;
  background: radial-gradient(circle, rgba(94, 169, 133, 0.34), rgba(79, 150, 199, 0));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.link-button:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 30px rgba(79, 150, 199, 0.2);
  background: var(--surface-nav);
  border-color: rgba(94, 169, 133, 0.58);
}

.contact-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.contact-form label {
  color: var(--text-accent);
  font-weight: 600;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 8px;
  background: var(--form-bg);
  color: var(--text-primary);
  padding: 12px 14px;
  font: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-secondary);
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.contact-form .project-button {
  width: 100%;
  border: none;
  cursor: pointer;
}

.link-button[href^="mailto:"] {
  border-color: rgba(94, 169, 133, 0.5);
  background: linear-gradient(130deg, rgba(223, 245, 234, 0.64), rgba(240, 252, 246, 0.58));
}

.link-button[href^="mailto:"]:hover {
  box-shadow:
    0 24px 48px rgba(79, 150, 199, 0.14),
    0 12px 26px rgba(94, 169, 133, 0.24);
  border-color: rgba(94, 169, 133, 0.68);
}

.link-button:hover::before {
  left: 86%;
  top: 120%;
}

.link-button:hover::after {
  opacity: 1;
}

.link-button:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow:
    0 10px 20px rgba(79, 150, 199, 0.16),
    0 4px 9px rgba(79, 150, 199, 0.12);
}

.link-button:focus-visible {
  outline: 2px solid rgba(94, 169, 133, 0.76);
  outline-offset: 3px;
}
.nav-list a:focus-visible,
.brand-link:focus-visible,
.footer-socials a:focus-visible {
  outline: 2px solid rgba(94, 169, 133, 0.76);
  outline-offset: 2px;
}
.site-footer {
  max-width: 1080px;
  margin: 0 auto 12px;
  padding: 14px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-card);
  backdrop-filter: blur(9px);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.footer-name {
  color: var(--blue-700);
  font-weight: 700;
}
.footer-note {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.footer-socials {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-socials a {
  color: var(--text-accent);
  text-decoration: none;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.25s ease;
}
.footer-socials a:hover {
  background: rgba(94, 169, 133, 0.16);
}

@media (max-width: 1024px) {
  body {
    padding: 30px 16px;
  }

  .top-nav {
    max-width: 920px;
  }

  .container {
    max-width: 920px;
    gap: 20px;
    padding-inline: 10px;
  }

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

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

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

@media (max-width: 768px) {
  body {
    padding: 26px 14px;
  }

  .top-nav {
    padding: 9px 12px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-list {
    gap: 8px;
  }

  .nav-list a {
    font-size: 0.86rem;
    padding: 7px 8px;
  }

  .container {
    gap: 18px;
    padding-inline: 8px;
  }

  .portfolio-card {
    padding: 20px;
    border-radius: 18px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .project-card {
    padding: 14px;
  }

  .hero-actions {
    max-width: 100%;
  }

  .hero-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 16px;
    padding: 22px;
  }

  .hero-copy h1 {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    padding: 22px 12px;
  }

  .site-header {
    top: 6px;
  }

  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    backdrop-filter: blur(8px);
  }

  .nav-actions {
    justify-content: space-between;
  }

  .brand-link {
    text-align: center;
  }

  .nav-list {
    justify-content: space-between;
    gap: 6px;
  }

  .nav-list a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
  }

  .container {
    gap: 16px;
    padding-inline: 6px;
    margin-top: 14px;
  }

  .portfolio-card {
    padding: 18px;
    border-radius: 16px;
    backdrop-filter: blur(9px);
    box-shadow:
      0 8px 18px rgba(79, 150, 199, 0.12),
      0 3px 8px rgba(79, 150, 199, 0.1);
  }

  .links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-card {
    padding: 13px;
    backdrop-filter: blur(8px);
    box-shadow:
      0 7px 15px rgba(79, 150, 199, 0.12),
      0 3px 8px rgba(79, 150, 199, 0.09);
  }

  .project-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
    margin-inline: auto;
    max-width: 320px;
    width: 100%;
  }

  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
  }

  .hero-copy {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-copy h1,
  .hero-tagline,
  .hero-value,
  .hero-description,
  .hero-trust {
    margin-left: auto;
    margin-right: auto;
  }

  .project-button {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    backdrop-filter: blur(8px);
  }

  .skill-pill {
    min-height: 42px;
    font-size: 0.93rem;
    padding: 10px 12px;
    backdrop-filter: blur(8px);
  }

  .link-button {
    font-size: 1rem;
    min-height: 44px;
    padding: 14px 16px;
    backdrop-filter: blur(8px);
  }

  .profile-pic {
    width: 100%;
    height: 100%;
  }

  .profile-media {
    width: 108px;
    height: 108px;
  }

  .profile-media::before {
    width: 146px;
    height: 146px;
  }

  .site-footer {
    margin-bottom: 8px;
    padding: 12px 14px;
    backdrop-filter: blur(7px);
  }
}

@media (max-width: 480px) {
  body {
    padding: 18px 10px;
  }

  .top-nav {
    padding: 8px 10px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .container {
    gap: 14px;
    padding-inline: 4px;
  }

  .portfolio-card {
    padding: 16px;
    border-radius: 14px;
  }

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

  .project-actions {
    gap: 8px;
  }

  .skill-pill,
  .project-button,
  .link-button {
    min-height: 46px;
  }

  .project-card h3 {
    font-size: 1rem;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .hero-tagline {
    font-size: 0.98rem;
  }

  .hero-value {
    font-size: 0.9rem;
    margin-top: 12px;
  }

  .hero-description {
    margin-top: 14px;
    font-size: 0.9rem;
  }

  .hero-trust {
    margin-top: 14px;
    font-size: 0.82rem;
  }

  .hero-actions {
    margin-top: 18px;
    gap: 10px;
  }

  .profile-media {
    width: 98px;
    height: 98px;
  }

  .profile-media::before {
    width: 132px;
    height: 132px;
  }

  .footer-socials {
    gap: 8px;
  }
}

@media (min-width: 1200px) {
  body {
    padding: 42px 24px;
  }

  .top-nav,
  .site-footer {
    max-width: 1080px;
  }

  .container {
    max-width: 1080px;
    gap: 24px;
    padding-inline: 14px;
  }

  .portfolio-card {
    padding: 26px;
  }

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

  .projects-grid {
    gap: 18px;
  }
}
.footer-copy {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.motion-entry {
  will-change: transform, opacity;
  transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--motion-delay, 0s);
}

.motion-entry[data-motion="up"] {
  opacity: 0;
  transform: translateY(40px);
}

.motion-entry[data-motion="left"] {
  opacity: 0;
  transform: translateX(-40px);
}

.motion-entry[data-motion="right"] {
  opacity: 0;
  transform: translateX(40px);
}

.motion-entry.animate-in {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .motion-entry,
  .motion-entry.animate-in,
  .motion-entry[data-motion="up"],
  .motion-entry[data-motion="left"],
  .motion-entry[data-motion="right"] {
    opacity: 1 !important;
    transform: none !important;
  }
}
