:root {
  --bg-top: #06151f;
  --bg-bottom: #122e36;
  --surface: rgba(255, 247, 237, 0.88);
  --surface-border: rgba(6, 21, 31, 0.14);
  --text-main: #0f1720;
  --text-muted: #3b4d57;
  --accent: #ee6c4d;
  --accent-strong: #d4512f;
  --highlight: #13a89e;
  --highlight-soft: #d9f4ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  overflow-x: hidden;
  position: relative;
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -3;
  opacity: 0.72;
  animation: drift 16s ease-in-out infinite;
}

.bg-shape-1 {
  width: 34rem;
  height: 34rem;
  top: -12rem;
  right: -8rem;
  background: radial-gradient(circle, #14b8a6 0%, #0f766e 66%, transparent 72%);
}

.bg-shape-2 {
  width: 28rem;
  height: 28rem;
  bottom: -8rem;
  left: -8rem;
  background: radial-gradient(circle, #ffb382 0%, #ee6c4d 60%, transparent 72%);
  animation-delay: 3s;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.hero {
  text-align: center;
  padding: 5rem 1.25rem 2.5rem;
  animation: rise-in 0.8s ease-out both;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  font-weight: 700;
  color: #d9f4ef;
}

h1,
h2,
h3 {
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2.1rem, 4.2vw, 4.1rem);
  color: #fff6ef;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.subtitle {
  margin: 0.7rem auto 0;
  max-width: 38rem;
  color: #dff5f0;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.tag-row {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  color: #fff8f3;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.tabs {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tab-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  padding: 0.58rem 1.05rem;
  cursor: pointer;
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  font-size: 0.95rem;
  color: #fdf3ea;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tab-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(212, 81, 47, 0.35);
}

section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1rem;
}

.panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: 0 18px 44px rgba(4, 10, 14, 0.28);
  animation: rise-in 0.45s ease both;
  backdrop-filter: blur(6px);
}

.panel h2 {
  margin: 0 0 1rem;
  border-bottom: 2px solid var(--highlight);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.panel p {
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.tab-content.active {
  display: block;
}

.tab-content.entering {
  animation: tab-in 0.3s ease both;
}

.tab-content.leaving {
  display: block;
  animation: tab-out 0.22s ease both;
}

.stats {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.stats article {
  background: linear-gradient(155deg, #ffffff, #edf8f5);
  border: 1px solid rgba(19, 168, 158, 0.24);
  border-radius: 14px;
  padding: 0.95rem;
}

.stats h3 {
  margin: 0;
  color: #0d7c75;
}

.stats p {
  margin: 0.4rem 0 0;
}

.skill-cloud {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-cloud span {
  background: var(--highlight-soft);
  border: 1px solid rgba(13, 124, 117, 0.3);
  color: #0d5b55;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.83rem;
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 0.9rem;
}

.timeline-item {
  background: linear-gradient(155deg, #ffffff, #edf8f5);
  border: 1px solid rgba(19, 168, 158, 0.24);
  border-radius: 14px;
  padding: 0.95rem;
}

.timeline-meta {
  display: inline-block;
  margin-bottom: 0.3rem;
  background: rgba(13, 124, 117, 0.12);
  color: #0d7c75;
  border: 1px solid rgba(13, 124, 117, 0.28);
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-item h3 {
  margin: 0.2rem 0;
  color: #123942;
}

.timeline-item p {
  margin: 0.3rem 0 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.95rem;
}

.project {
  --project-banner: none;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #1c3a46, #112a34);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 1rem;
  min-height: 235px;
  color: #f7fffd;
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, min-height 0.28s ease;
}

.project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to bottom, rgba(4, 17, 23, 0.05) 15%, rgba(4, 17, 23, 0.88) 76%),
    var(--project-banner);
  background-size: cover;
  background-position: center;
  opacity: 0.96;
}

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(5, 14, 19, 0.4) 100%);
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(3, 12, 16, 0.36);
}

.project:focus-visible {
  outline: 2px solid #ffd3c7;
  outline-offset: 2px;
}

.project > * {
  position: relative;
  z-index: 2;
}

.project p,
.project a,
.project strong,
.project h3 {
  color: #f5fcfa;
}

.project a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.project p {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.project.has-banner {
  border-color: rgba(255, 255, 255, 0.42);
}

.project:not(.has-banner)::before {
  background-image:
    linear-gradient(to bottom, rgba(4, 17, 23, 0.28) 15%, rgba(4, 17, 23, 0.88) 76%),
    linear-gradient(120deg, #2a5d6d, #1a3743);
}

.project.expanded {
  grid-column: 1 / -1;
  order: -1;
  min-height: 430px;
  box-shadow: 0 20px 36px rgba(3, 12, 16, 0.45);
}

.project.expanded::before {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;
  background-color: #0f2730;
}

.project h3 {
  margin: 0;
  font-size: 1.2rem;
}

.project-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.project-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 1.9rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  background: rgba(8, 20, 27, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
}

a {
  color: #0d7c75;
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  color: #09514c;
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 1.6rem 1rem 2rem;
  color: #deeee8;
  font-size: 0.93rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tab-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tab-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(14px, -12px) scale(1.03);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3.5rem;
  }

  .panel {
    padding: 1rem;
    border-radius: 16px;
  }

  .tab-button {
    width: 100%;
    max-width: 240px;
  }

  .bg-shape-1,
  .bg-shape-2 {
    width: 21rem;
    height: 21rem;
  }

  .project {
    min-height: 250px;
  }

  .project.expanded {
    min-height: 340px;
  }
}