:root {
  --bg: #eef7fb;
  --surface: #f8fdff;
  --surface-strong: rgba(255, 255, 255, 0.82);
  --text: #1d2b36;
  --muted: #637887;
  --border: rgba(78, 126, 154, 0.14);
  --accent: #5ebfd4;
  --accent-deep: #2d7d96;
  --accent-soft: #9ee3ef;
  --shadow: 0 18px 50px rgba(83, 133, 163, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  background-image: linear-gradient(180deg, #f4fbfe 0%, #eef7fb 42%, #f9fdff 100%);
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(244, 251, 254, 0.8);
  border-bottom: 1px solid rgba(78, 126, 154, 0.12);
}

.nav-shell,
.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand,
.footer-name,
h1,
h2,
h3,
dt {
  letter-spacing: 0;
}

.brand {
  font-size: 1rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: end;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(134, 216, 232, 0.12), rgba(45, 125, 150, 0.5)),
    linear-gradient(0deg, rgba(16, 43, 58, 0.28), rgba(16, 43, 58, 0.08));
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #f6feff;
  padding: 9rem 0 4rem;
}

.contact-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
}

.contact-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(134, 216, 232, 0.12), rgba(45, 125, 150, 0.5)),
    linear-gradient(0deg, rgba(16, 43, 58, 0.28), rgba(16, 43, 58, 0.08));
}

.contact-media {
  position: absolute;
  inset: 0;
}

.contact-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-content {
  position: relative;
  z-index: 1;
  color: #f6feff;
  text-align: center;
}

.eyebrow,
.section-label,
.project-tag {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.contact-layout h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.98;
  margin: 0 0 1rem;
}

.hero-copy,
.contact-copy {
  max-width: 640px;
  font-size: 1.08rem;
}

.hero-copy {
  color: rgba(246, 254, 255, 0.88);
}

.contact-copy {
  color: var(--muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 2rem auto 0;
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(244, 254, 255, 0.42);
  border-radius: 8px;
  background: rgba(248, 253, 255, 0.14);
  color: #f6feff;
  font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(244, 254, 255, 0.6);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  align-self: center;
  margin-top: 1rem;
}

.hero-actions,
.filter-bar,
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease,
    border-color 160ms ease;
}

.button:hover,
.button:focus-visible,
.filter-chip:hover,
.filter-chip:focus-visible {
  transform: translateY(-1px);
}

.primary {
  background: var(--accent);
  color: #0f3443;
}

.secondary {
  background: rgba(248, 253, 255, 0.14);
  color: #f4feff;
  border-color: rgba(244, 254, 255, 0.42);
}

.tertiary {
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--border);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  max-width: 720px;
}

.hero-stats div {
  padding-top: 1rem;
  border-top: 1px solid rgba(244, 254, 255, 0.34);
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-stats div:hover {
  transform: translateY(-5px);
  border-top-color: var(--accent);
}

.hero-stats div:hover dt {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.hero-stats dt {
  font-size: 2rem;
  font-weight: 800;
}

.hero-stats dd {
  margin: 0;
  color: rgba(244, 254, 255, 0.82);
}

.section {
  padding: 5rem 0;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border);
  cursor: pointer;
  color: var(--muted);
}

.filter-chip.is-active {
  background: var(--accent-deep);
  color: #f5feff;
  border-color: var(--accent-deep);
}

.project-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card,
.skills-grid article,
.contact-panel {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.project-card.is-hidden {
  display: none;
}

.project-visual {
  min-height: 230px;
  padding: 1.5rem;
  display: flex;
  align-items: end;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f8feff;
}

.sunset {
  background: linear-gradient(135deg, #79d7e8, #9dcdf8);
}

.mint {
  background: linear-gradient(135deg, #60c3d7, #82e0c8);
}

.coral {
  background: linear-gradient(135deg, #7eb8ea, #a8e6f2);
}

.project-copy,
.skills-grid article,
.contact-panel {
  padding: 1.5rem;
}

.project-copy h3,
.skills-grid h3,
.contact-panel h2 {
  margin: 0.5rem 0;
  font-size: 1.35rem;
}

.meta-list,
.contact-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.meta-list li,
.contact-points li {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #edf8fc;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.meta-list li:hover,
.contact-points li:hover {
  transform: scale(1.1);
  background: var(--accent);
  color: #0f3443;
  box-shadow: 0 4px 12px rgba(94, 191, 212, 0.3);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline div {
  padding: 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.52);
  border-radius: 0 8px 8px 0;
}

.timeline span {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 800;
}

.skills-grid article p,
.project-copy p,
.timeline p,
.highlights p,
.contact-panel li,
.site-footer p {
  color: var(--muted);
}

.site-footer {
  padding: 1rem 0;
  border-top: 1px solid rgba(78, 126, 154, 0.12);
}

.newsletter-section {
  padding-top: 1rem;
}

.newsletter-card {
  padding: 2rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.newsletter-card h2 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.newsletter-card p {
  margin: 0 0 1.2rem;
  max-width: 680px;
}

/* Interactive Elements */
.mouse-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
  transition: transform 0.1s ease;
  mix-blend-mode: multiply;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Scroll Animations */
.section,
.project-card,
.skills-grid article,
.timeline div {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.animate-in,
.project-card.animate-in,
.skills-grid article.animate-in,
.timeline div.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Project Card Hover Effects */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

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

/* Button hover enhancements */
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(94, 191, 212, 0.3);
}

.primary:hover {
  background: var(--accent-deep);
}

.secondary:hover {
  background: rgba(248, 253, 255, 0.25);
  border-color: rgba(244, 254, 255, 0.6);
}

/* Timeline interactive elements */
.timeline div {
  transition: all 0.3s ease;
  cursor: pointer;
}

.timeline div:hover {
  background: rgba(255, 255, 255, 0.8);
  border-left-color: var(--accent-deep);
  transform: translateX(8px);
}

/* Skills grid hover effects */
.skills-grid article {
  transition: all 0.3s ease;
}

.skills-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(83, 133, 163, 0.15);
}

/* Filter chip enhancements */
.filter-chip {
  transition: all 0.2s ease;
}

.filter-chip:hover {
  transform: translateY(-1px) scale(1.05);
}

.filter-chip.is-active {
  transform: scale(1.05);
}

/* Hero stats animation */
.hero-stats dt {
  transition: color 0.3s ease;
}

.hero-stats div:hover dt {
  color: var(--accent);
}

/* Typing animation cursor */
.hero h1::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Theme Toggle */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.theme-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #0f3443;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(94, 191, 212, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 8px 30px rgba(94, 191, 212, 0.4);
}

/* Dark Mode Styles */
body.dark-mode {
  --bg: #0f1419;
  --surface: #1a1f26;
  --surface-strong: rgba(26, 31, 38, 0.9);
  --text: #e8f4f8;
  --muted: #94a3b8;
  --border: rgba(56, 75, 102, 0.3);
  --accent: #3b82f6;
  --accent-deep: #1d4ed8;
  --accent-soft: #60a5fa;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

body.dark-mode .site-header {
  background: rgba(15, 20, 25, 0.8);
  border-bottom-color: rgba(56, 75, 102, 0.3);
}

body.dark-mode .hero::after {
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.3)),
    linear-gradient(0deg, rgba(15, 20, 25, 0.6), rgba(15, 20, 25, 0.2));
}

body.dark-mode .project-card,
body.dark-mode .skills-grid article,
body.dark-mode .contact-panel {
  background: var(--surface-strong);
  border-color: var(--border);
}

body.dark-mode .timeline div {
  background: rgba(26, 31, 38, 0.6);
}

body.dark-mode .meta-list li,
body.dark-mode .contact-points li {
  background: rgba(56, 75, 102, 0.2);
  color: var(--muted);
}

body.dark-mode .filter-chip {
  background: rgba(26, 31, 38, 0.8);
  border-color: var(--border);
  color: var(--muted);
}

body.dark-mode .filter-chip.is-active {
  background: var(--accent-deep);
  color: #f5feff;
}

body.dark-mode .mouse-follower {
  background: var(--accent);
  mix-blend-mode: screen;
}

/* Floating Shapes Animation */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.shape {
  position: absolute;
  opacity: 0.1;
  animation: float 20s infinite linear;
}

.shape-1 {
  top: 10%;
  left: 10%;
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  animation-delay: 0s;
}

.shape-2 {
  top: 20%;
  right: 15%;
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation-delay: -5s;
}

.shape-3 {
  bottom: 30%;
  left: 20%;
  width: 80px;
  height: 80px;
  background: var(--accent-deep);
  border-radius: 20px;
  animation-delay: -10s;
}

.shape-4 {
  top: 60%;
  right: 10%;
  width: 50px;
  height: 50px;
  background: var(--accent);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation-delay: -15s;
}

.shape-5 {
  bottom: 20%;
  right: 25%;
  width: 70px;
  height: 70px;
  background: var(--accent-soft);
  border-radius: 50% 20px;
  animation-delay: -20s;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(120deg);
  }
  66% {
    transform: translateY(20px) rotate(240deg);
  }
  100% {
    transform: translateY(0px) rotate(360deg);
  }
}

/* Responsive adjustments for floating shapes */
@media (max-width: 768px) {
  .shape-1, .shape-2, .shape-3, .shape-4, .shape-5 {
    display: none;
  }
}

.contact-main {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
}

.contact-list {
  margin-top: 2rem;
}

.contact-list a {
  font-weight: 600;
  color: var(--accent-deep);
}

.full-width {
  width: 100%;
}

@media (max-width: 900px) {
  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding-top: 8rem;
  }

  .contact-section {
    min-height: 60vh;
    padding: 5rem 0;
  }

  .section-heading,
  .highlights,
  .split-layout,
  .contact-layout,
  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .footer-shell {
    min-height: 60px;
    padding: 1rem 0;
    align-items: start;
    flex-direction: column;
  }

  .hero-copy,
  .contact-copy {
    font-size: 1rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .button,
  .filter-chip {
    width: auto;
  }
}

/* Resume Section */
.resume-section {
  background: var(--surface);
  text-align: center;
}

.resume-content {
  max-width: 600px;
  margin: 0 auto;
}

.resume-content h2 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.resume-content p {
  margin-bottom: 2rem;
  color: var(--muted);
}

.resume-content .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}