/*===== GOOGLE FONTS (Now loaded in HTML for better SEO/Speed) =====*/
/*===== ROOT VARIABLES =====*/
:root {
  --bg: #050712;
  --bg-2: #0b0f21;
  --card: rgba(255, 255, 255, 0.04);
  --card-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --muted: #9aa7c4;
  --text: #e8ecf6;
  --accent: #6cf1d6;
  --accent-2: #7aa2ff;
  --accent-3: #ff7fd1;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  --font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-height: 72px;
  --radius: 18px;
  --radius-sm: 12px;
  --transition: 0.25s ease;
}

@media (min-width: 1024px) {
  :root {
    --header-height: 80px;
  }
}

/*===== SVG ICON STYLING =====*/
svg.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: currentColor;
  transition: var(--transition);
}

/*===== ANIMATIONS =====*/
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: slideInUp 0.6s ease-out forwards;
}

/*===== BASE STYLES =====*/
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for accessibility and low-end devices */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  position: relative;
}

/* Base overlay to dim the 3D background and ensure readability */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 20%, rgba(108, 241, 214, 0.05), transparent 40%),
              radial-gradient(circle at 80% 0%, rgba(122, 162, 255, 0.08), transparent 35%),
              linear-gradient(135deg, rgba(5,7,18,0.7) 0%, rgba(5,9,18,0.85) 40%, rgba(6,13,27,0.95) 100%);
  pointer-events: none;
}

/* Fixed container for the Vanta.js Canvas */
#vanta-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* Custom themed scrollbar */
*:focus-visible,
* {
  scrollbar-width: thin;
  scrollbar-color:
    var(--accent) rgba(0,0,0,0.2);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.13);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.15);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

img { max-width: 100%; display: block; height: auto; border-radius: 14px; }

h1, h2, h3, h4, p { margin: 0; }

section { padding: 5rem 0; }

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

/* AD DISCLOSURE BADGE */
.ad-disclosure {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  background: rgba(255, 125, 209, 0.15);
  border: 1px solid rgba(255, 125, 209, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition);
  cursor: help;
}

.ad-disclosure:hover {
  background: rgba(255, 125, 209, 0.25);
  border-color: rgba(255, 125, 209, 0.5);
  transform: translateY(-2px);
}

.ad-disclosure .icon {
  display: inline-block;
}

/* Light theme */
body.theme-light .ad-disclosure {
  background: rgba(255, 125, 209, 0.08);
  border-color: rgba(255, 125, 209, 0.2);
  color: #db2777;
}

body.theme-light .ad-disclosure:hover {
  background: rgba(255, 125, 209, 0.15);
  border-color: rgba(255, 125, 209, 0.3);
}

/*===== HEADER =====*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(5, 7, 18, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.nav__brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav__pill {
  padding: 0.25rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav__menu { display: none; }

.nav__list { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; }

.nav__link {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  color: var(--muted);
  transition: var(--transition);
}

.nav__link:hover, .nav__link.active-link { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.nav__actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle, .nav__toggle {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.3rem;
}

.theme-toggle:hover, .nav__toggle:hover { transform: translateY(-2px); }

.nav__toggle { font-size: 1.6rem; display: inline-flex; }

@media (max-width: 900px) {
  .nav__menu {
    position: fixed;
    inset: calc(var(--header-height) + 10px) 1rem auto 1rem;
    background: rgba(7, 9, 24, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: none;
    box-shadow: var(--shadow);
  }
  .nav__menu.show { display: block; }
  .nav__list { flex-direction: column; padding: 1rem; }
  .nav__link { width: 100%; }
}

@media (min-width: 901px) {
  .nav__menu { display: block !important; }
  .nav__toggle { display: none; }
}

/*===== HERO =====*/
.hero { padding-top: calc(var(--header-height) + 2.5rem); position: relative; overflow: hidden; }

/* The Vanta canvas gets injected fixed at the back, so content flows normally. */

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero__eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.8px; font-size: 0.95rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.hero__title { font-size: clamp(2.3rem, 4vw, 3.6rem); line-height: 1.1; margin: 0.35rem 0 1rem; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.hero__subtitle { color: var(--muted); max-width: 620px; font-size: 1.05rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.hero__actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.85rem 1.5rem; border-radius: 999px; border: 1px solid transparent; font-weight: 700; cursor: pointer; transition: all 0.25s ease; text-decoration: none; }

.btn--primary { background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%); color: #0b1221; box-shadow: 0 12px 30px rgba(108, 241, 214, 0.25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(108, 241, 214, 0.35); }
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn--ghost { border-color: var(--border); background: rgba(255, 255, 255, 0.04); color: var(--text); backdrop-filter: blur(4px); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.1); }

.hero__meta { display: flex; gap: 1.25rem; margin-top: 1.5rem; color: var(--muted); font-size: 0.95rem; text-shadow: 0 2px 4px rgba(0,0,0,0.4); }

.hero__social { display: flex; gap: 0.65rem; margin-top: 1.25rem; }

.hero__social a { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text); background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(4px); transition: var(--transition); }
.hero__social a:hover { background: var(--accent); color: #0b1221; border-color: transparent; transform: translateY(-3px) scale(1.05); }

.hero__image { position: relative; }

.hero__photo { 
  position: relative; 
  z-index: 1; 
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px rgba(108, 241, 214, 0.5), 0 0 60px rgba(108, 241, 214, 0.3), 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: morphShape 8s ease-in-out infinite, floatImage 3s ease-in-out infinite;
}

/*===== STATS =====*/
.stats { padding-top: 1rem; }

.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }

.stat-card { padding: 1.4rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card-strong); backdrop-filter: blur(14px); box-shadow: var(--shadow); }

.stat-card h3 { font-size: 1.5rem; margin-bottom: 0.35rem; }

.stat-card p { color: var(--muted); font-size: 0.95rem; }

/*===== SECTIONS =====*/
.section__head { margin-bottom: 1.5rem; display: flex; align-items: baseline; gap: 0.6rem; }

.section__eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.7px; font-size: 0.85rem; }

.section__title { font-size: 2rem; }

.section__text { color: var(--muted); max-width: 720px; }

/* Improve initial render performance on long lists */
.about__card,
.skill-card,
.project-card,
.gallery__item,
.timeline__item,
.contact__card {
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

/*===== ABOUT =====*/
.about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; align-items: center; }

.about__card { padding: 1.75rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card-strong); backdrop-filter: blur(16px); box-shadow: var(--shadow); }

.about__list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.65rem; color: var(--text); opacity: 0.9; }

/*===== TIMELINE =====*/
.timeline { position: relative; padding-left: 2rem; }

.timeline::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%); }

.timeline__item { position: relative; margin-bottom: 2.5rem; }

.timeline__marker { position: absolute; left: -2.45rem; top: 0.3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 3px var(--card); }

.timeline__content { padding: 1.5rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card-strong); backdrop-filter: blur(14px); box-shadow: var(--shadow); }

.timeline__date { display: inline-block; padding: 0.35rem 0.75rem; border-radius: 8px; background: rgba(108, 241, 214, 0.12); color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }

.timeline__content h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }

.timeline__content h4 { color: var(--muted); font-size: 1rem; font-weight: 500; margin-bottom: 0.75rem; }

.timeline__content p { color: var(--muted); line-height: 1.6; }

/*===== SKILLS =====*/
.skills__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

.skill-card { padding: 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card-strong); backdrop-filter: blur(14px); box-shadow: var(--shadow); display: grid; gap: 0.8rem; }

.skill-card h3 { font-size: 1.1rem; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.tag { padding: 0.45rem 0.75rem; border-radius: 10px; background: rgba(255, 255, 255, 0.07); color: var(--text); font-size: 0.9rem; border: 1px solid var(--border); }

/*===== PROJECTS =====*/
.projects__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }

.project-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card-strong); backdrop-filter: blur(14px); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }

.project-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 0; }

.project-card__body { padding: 1.25rem; display: grid; gap: 0.5rem; }

.project-card__title { font-size: 1.1rem; }

.project-card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.project-card__tags .tag { background: rgba(108, 241, 214, 0.14); border-color: rgba(108, 241, 214, 0.3); color: #d6fff4; }

.project-card__cta { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

.project-card__link { color: var(--text); font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; transition: color 0.25s ease; }

.project-card__link:hover { color: var(--accent); }

/*===== GALLERY =====*/
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow); aspect-ratio: 1; }

.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease, filter 0.3s ease; }

.gallery__item img.lazy-image {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.3s ease, filter 0.3s ease;
}

.gallery__item img.lazy-image.loaded {
  opacity: 1;
}

.gallery__item:hover img { transform: scale(1.1); filter: brightness(0.8); }

/*===== CONTACT =====*/
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; align-items: start; }

.contact__card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card-strong); backdrop-filter: blur(16px); box-shadow: var(--shadow); }

.contact__form { display: grid; gap: 0.9rem; }

.input { 
  width: 100%; 
  padding: 0.9rem 1rem; 
  border-radius: 12px; 
  border: 2px solid var(--border); 
  background: rgba(255, 255, 255, 0.05); 
  color: var(--text); 
  font-size: 1rem; 
  font-family: var(--font);
  transition: all 0.25s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(108, 241, 214, 0.1);
}

.input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.input::placeholder { color: rgba(234, 239, 246, 0.5); }

textarea.input { 
  min-height: 140px; 
  resize: vertical;
  font-family: var(--font);
}

select.input {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236cf1d6' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select.input option {
  background: var(--bg-2);
  color: var(--text);
  padding: 0.5rem;
}

select.input option:checked {
  background: linear-gradient(var(--accent), var(--accent));
  background-color: var(--accent) !important;
  color: #0b1221 !important;
}

.contact__form { display: grid; gap: 0.9rem; }



/*===== LIGHT THEME =====*/
body.theme-light {
  background: transparent;
  color: #0c1530;
}

body.theme-light::before {
  background: radial-gradient(circle at 15% 20%, rgba(108, 241, 214, 0.08), transparent 30%),
              radial-gradient(circle at 80% 0%, rgba(122, 162, 255, 0.12), transparent 28%),
              linear-gradient(135deg, rgba(249, 250, 252, 0.85) 0%, rgba(242, 245, 251, 0.9) 45%, rgba(236, 241, 249, 0.95) 100%);
}

body.theme-light .header { 
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(12, 21, 48, 0.12);
}

body.theme-light .nav__brand {
  color: #0c1530;
}

body.theme-light .nav__pill {
  background: rgba(108, 241, 214, 0.12);
  color: #0c7f6d;
  border: 1px solid rgba(108, 241, 214, 0.25);
}

body.theme-light .nav__link { 
  color: #3f4a64; 
}

body.theme-light .nav__link:hover, 
body.theme-light .nav__link.active-link { 
  color: #0c1530; 
  background: rgba(108, 241, 214, 0.08);
}

body.theme-light .nav__link.active-link::after {
  background: #0c7f6d;
}

body.theme-light .theme-toggle, 
body.theme-light .nav__toggle { 
  border-color: rgba(12, 21, 48, 0.12); 
  background: rgba(12, 21, 48, 0.05);
  color: #0c1530;
}

body.theme-light .theme-toggle:hover,
body.theme-light .nav__toggle:hover {
  background: rgba(108, 241, 214, 0.12);
  border-color: rgba(108, 241, 214, 0.3);
}

body.theme-light .hero__eyebrow,
body.theme-light .section__eyebrow {
  color: #0c7f6d;
}

body.theme-light .btn--primary { 
  background: linear-gradient(120deg, #0c7f6d 0%, #00a896 100%);
  box-shadow: 0 12px 30px rgba(12, 127, 109, 0.2);
}

body.theme-light .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(12, 127, 109, 0.28);
}

body.theme-light .btn--ghost { 
  background: rgba(108, 241, 214, 0.08);
  border-color: rgba(108, 241, 214, 0.25); 
  color: #0c1530;
}

body.theme-light .btn--ghost:hover {
  background: rgba(108, 241, 214, 0.15);
  border-color: rgba(108, 241, 214, 0.4);
}

body.theme-light .stat-card, 
body.theme-light .about__card, 
body.theme-light .skill-card, 
body.theme-light .project-card, 
body.theme-light .contact__card, 
body.theme-light .timeline__content { 
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(12, 21, 48, 0.1);
  box-shadow: 0 12px 40px rgba(12, 21, 48, 0.08);
}

body.theme-light .stat-card:hover,
body.theme-light .about__card:hover,
body.theme-light .skill-card:hover,
body.theme-light .project-card:hover,
body.theme-light .contact__card:hover {
  border-color: rgba(108, 241, 214, 0.25);
  box-shadow: 0 20px 50px rgba(12, 21, 48, 0.12);
}

body.theme-light .timeline__marker {
  background: #0c7f6d;
  border-color: #f9fafc;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

body.theme-light .timeline::before {
  background: linear-gradient(180deg, #0c7f6d 0%, #00a896 50%, #7aa2ff 100%);
}

body.theme-light .timeline__date {
  background: rgba(108, 241, 214, 0.15);
  color: #0c7f6d;
}

body.theme-light .tag {
  background: rgba(108, 241, 214, 0.12);
  border-color: rgba(108, 241, 214, 0.25);
  color: #0c1530;
}

body.theme-light .project-card__tags .tag { 
  color: #0c1530; 
  border-color: rgba(108, 241, 214, 0.25); 
  background: rgba(108, 241, 214, 0.15);
}

body.theme-light .project-card__link {
  color: #0c1530;
}

body.theme-light .project-card__link:hover {
  color: #0c7f6d;
}

body.theme-light .hero__social a {
  border-color: rgba(12, 21, 48, 0.1);
  background: rgba(12, 21, 48, 0.04);
  color: #0c1530;
}

body.theme-light .hero__social a:hover {
  background: #0c7f6d;
  color: #ffffff;
  border-color: transparent;
}



body.theme-light .nav__menu { 
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(12, 21, 48, 0.1);
}

body.theme-light .input {
  background: rgba(12, 21, 48, 0.04);
  border-color: rgba(12, 21, 48, 0.15);
  color: #0c1530;
}

body.theme-light .input:focus {
  border-color: #0c7f6d;
  background: rgba(12, 21, 48, 0.08);
  box-shadow: 0 0 0 3px rgba(12, 127, 109, 0.1);
}

body.theme-light .input:hover:not(:focus) {
  border-color: rgba(12, 21, 48, 0.25);
  background: rgba(12, 21, 48, 0.06);
}

body.theme-light .input::placeholder { 
  color: rgba(12, 21, 48, 0.4);
}

body.theme-light select.input {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c7f6d' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

body.theme-light select.input option {
  background: #f9fafc;
  color: #0c1530;
}

body.theme-light select.input option:checked {
  background: linear-gradient(#0c7f6d, #0c7f6d);
  background-color: #0c7f6d !important;
  color: white !important;
}

/*===== SCROLL REVEAL ANIMATIONS =====*/
@keyframes morphShape {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes sr-reveal {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sr-reveal-left {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sr-reveal-right {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.sr {
  animation: sr-reveal 1s ease forwards;
}

.sr.sr--reveal-left {
  animation: sr-reveal-left 1s ease forwards;
}

.sr.sr--reveal-right {
  animation: sr-reveal-right 1s ease forwards;
}

/*===== COOKIE CONSENT BANNER =====*/
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 15, 33, 0.98);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-consent__content {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.cookie-consent__message {
  flex: 1;
}

.cookie-consent__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cookie-consent__text {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.cookie-consent__link {
  color: var(--accent);
  text-decoration: underline;
  transition: color var(--transition);
}

.cookie-consent__link:hover {
  color: var(--accent-2);
}

.cookie-consent__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-consent__btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.cookie-consent__btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.cookie-consent__btn--accept {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border: none;
  color: #0b1221;
  font-weight: 600;
}

.cookie-consent__btn--accept:hover {
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 241, 214, 0.3);
}

.cookie-consent__btn--reject,
.cookie-consent__btn--settings {
  background: rgba(255, 255, 255, 0.05);
}

.cookie-consent__btn--reject:hover,
.cookie-consent__btn--settings:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Light theme */
body.theme-light .cookie-consent {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: #e5e7eb;
}

body.theme-light .cookie-consent__title {
  color: #111827;
}

body.theme-light .cookie-consent__text {
  color: #6b7280;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .cookie-consent__content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-consent__actions {
    width: 100%;
  }

  .cookie-consent__btn {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cookie-consent__content {
    padding: 1rem;
    gap: 1rem;
  }

  .cookie-consent__text {
    font-size: 0.8rem;
  }

  .cookie-consent__btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/*===== TOAST NOTIFICATIONS =====*/
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 400px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--card-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast.toast--success {
  border-color: var(--accent);
}

.toast.toast--success .toast__icon {
  color: var(--accent);
}

.toast.toast--error {
  border-color: #ff6b6b;
}

.toast.toast--error .toast__icon {
  color: #ff6b6b;
}

.toast__message {
  flex: 1;
  color: var(--text);
  font-size: 0.95rem;
}

.toast__close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

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

/*===== BACK TO TOP BUTTON =====*/
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b1221;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(108, 241, 214, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(108, 241, 214, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
}

/*===== LOADING SKELETON =====*/
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-strong) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

.skeleton-title {
  height: 24px;
  width: 70%;
  margin-bottom: 1rem;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  width: 80%;
}

/*===== CONTACT FORM =====*/
.contact__form { 
  display: grid; 
  gap: 1rem;
}

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

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.contact__form .btn--primary {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .contact__form .btn--primary {
    padding: 0.75rem 1.25rem;
  }
}

/*===== HCAPTCHA STYLING =====*/
.hcaptcha {
  margin: 0.5rem 0;
  padding: 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.hcaptcha iframe {
  border-radius: 8px !important;
}

body.theme-light .hcaptcha {
  background: rgba(12, 21, 48, 0.04);
  border-color: rgba(12, 21, 48, 0.15);
}

/*===== SUCCESS ANIMATION =====*/
.success-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  background: rgba(5, 7, 18, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  box-shadow: 0 20px 60px rgba(108, 241, 214, 0.3);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.success-animation.show {
  opacity: 1;
  visibility: visible;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 241, 214, 0.1);
  border: 3px solid var(--accent);
}

.success-checkmark i {
  font-size: 3rem;
  color: var(--accent);
  animation: checkmark-pop 0.5s ease;
}

@keyframes checkmark-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.success-animation h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.success-animation p {
  color: var(--muted);
  font-size: 0.95rem;
}

/*===== RESPONSIVE =====*/
@media (max-width: 600px) {
  section { padding: 4rem 0; }
  .hero__actions { width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .hero__grid { grid-template-columns: 1fr; }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  .toast-container {
    right: 0.5rem;
    left: 0.5rem;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
}

/*===== CUSTOM CURSOR =====*/
@media (pointer: fine) {
  body, a, button, input, textarea, select, .nav__toggle, .theme-toggle, .project-card, .gallery__item img {
    cursor: none !important;
  }
  
  .cursor-dot,
  .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    pointer-events: none;
    will-change: transform;
    /* transition: opacity 0.3s ease; */
  }
  
  .cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
  }
  
  .cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(108, 241, 214, 0.2) inset;
    transition: width 0.25s ease-out, height 0.25s ease-out, background-color 0.25s ease-out, border 0.25s ease-out;
  }
  
  .cursor-outline.hovered {
    width: 60px;
    height: 60px;
    border: 1px solid rgba(108, 241, 214, 0.4);
    background-color: rgba(108, 241, 214, 0.1);
  }
}

/*===== BLOG PREVIEW =====*/
.blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.blog-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: all var(--transition);
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 35px rgba(108, 241, 214, 0.15);
}

.blog-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.blog-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text);
  transition: color var(--transition);
}

.blog-card:hover .blog-card__title {
  color: var(--accent);
}

.blog-card__desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.blog-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card__link:hover {
  text-decoration: underline;
}

.blog__more {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

body.theme-light .blog-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(12, 21, 48, 0.1);
  box-shadow: 0 12px 40px rgba(12, 21, 48, 0.08);
}

body.theme-light .blog-card:hover {
  border-color: #0c7f6d;
  box-shadow: 0 20px 50px rgba(12, 21, 48, 0.12);
}

body.theme-light .blog-card__title {
  color: #0c1530;
}

body.theme-light .blog-card:hover .blog-card__title {
  color: #0c7f6d;
}

body.theme-light .blog-card__link {
  color: #0c7f6d;
}

/*===== BOTTOM AD SECTION =====*/
.ad-section {
  padding: 2rem 0;
  text-align: center;
}

.ad-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.ad-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 0 auto;
  max-width: 728px;
  overflow: hidden;
}

body.theme-light .ad-container {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(12, 21, 48, 0.1);
}
