/* Theme */
:root {
  --bg: #f4fffb;
  --bg-alt: #e8fbff;
  --panel: #ffffff;
  --text: #0f2b2e;
  --muted: #476b6f;
  --primary: #37bdaa;
  /* greenish */
  --primary-600: #2aa594;
  --accent: #5ec8f2;
  /* blue */
  --border: #d8ecec;
  --shadow: 0 6px 24px rgba(15, 43, 46, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg), var(--bg-alt));
  line-height: 1.6;
}

/* Links */
a {
  color: var(--primary-600);
  text-decoration-color: rgba(42, 165, 148, 0.35);
}

a:hover {
  color: var(--primary);
  text-decoration-color: rgba(55, 189, 170, 0.55);
}

/* Layout */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  padding: 24px 20px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.avatar {
  font-size: 28px;
}

.name {
  font-size: 20px;
  margin: 0;
}

.role {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sidebar-sep {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: rgba(55, 189, 170, 0.1);
}

.nav-link.active {
  background: rgba(94, 200, 242, 0.16);
  color: #0a3a3e;
  box-shadow: inset 3px 0 0 0 var(--primary);
}

.sidebar-toggle {
  display: none;
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
}

.content {
  margin-left: 280px;
  padding: 40px 40px;
}

.section {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 48px 0;
  scroll-snap-align: start;
}

.section h2 {
  font-size: 36px;
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

.section h2 .icon {
  margin-right: 8px;
}

.section p {
  margin: 0 0 10px;
  text-align: justify;
  text-justify: inter-word;
}

.highlights {
  padding-left: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin: 12px 0;
}

.hero-cards .card {
  margin: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(94, 200, 242, 0.18);
  color: #0a3a3e;
  border: 1px solid var(--border);
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: -4px;
  text-align: left;
}

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.timeline li {
  position: relative;
  padding: 12px 14px 12px 16px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  /* green stripe */
}

/* Add left stripe to Experience cards */
#experience .card {
  border-left: 4px solid var(--primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--primary-600);
}

/* Project media */
.project .project-media {
  width: 100%;
  overflow: hidden;
  height: 120px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 44px;
  background: linear-gradient(135deg, rgba(55, 189, 170, 0.18), rgba(94, 200, 242, 0.18));
  margin-bottom: 10px;
}

/* Skills as cards */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.skill.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  transform-origin: center;
}

.skill.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.skill-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.footer {
  color: var(--muted);
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 960px) {
  .content {
    margin-left: 0;
    padding: 24px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .sidebar nav {
    display: none;
  }

  .sidebar.open nav {
    display: block;
  }

  .sidebar-toggle {
    display: block;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

/* Creative section backgrounds */
.section::before {
  content: "";
  position: absolute;
  inset: 8% 0 auto auto;
  width: 380px;
  height: 380px;
  background: radial-gradient(closest-side, rgba(55, 189, 170, 0.18), rgba(55, 189, 170, 0.0));
  filter: blur(4px);
  border-radius: 50%;
  z-index: -1;
}

.section::after {
  content: "";
  position: absolute;
  bottom: 6%;
  left: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(closest-side, rgba(94, 200, 242, 0.20), rgba(94, 200, 242, 0.0));
  filter: blur(6px);
  border-radius: 50%;
  z-index: -1;
}

/* Alternate tints */
.section--mint {
  background: linear-gradient(180deg, rgba(55, 189, 170, 0.06), rgba(55, 189, 170, 0));
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.section--aqua {
  background: linear-gradient(180deg, rgba(94, 200, 242, 0.06), rgba(94, 200, 242, 0));
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Fancy headings */
.section--mint h2 {
  background: linear-gradient(90deg, #0f2b2e, #2aa594);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section--aqua h2 {
  background: linear-gradient(90deg, #0f2b2e, #2a7aa5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* White hero section */
.section--white {
  background: var(--panel);
  border-radius: 0;
  padding-left: 80px;
  padding-right: 0;
  padding-bottom: 60px;
}

.home-hero .hero-grid {
  display: grid;
  grid-template-columns: 3fr 3fr;
  grid-template-rows: auto auto auto;
  gap: 16px;
  align-items: start;
}

.hero-intro {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

.hero-intro h2 {
  margin: 0 0 8px 0;
}

.hero-card-about {
  grid-column: 1;
  grid-row: 2;
}

.hero-media {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  align-content: start;
  position: sticky;
  top: 40px;
}

.hero-card-focus {
  grid-column: 1;
  grid-row: 3;
}

.hero-card-contact {
  grid-column: 2;
  grid-row: 3;
}

.highlights-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-left: 0;
  list-style-type: none;
  margin: 0;
}

.highlights-columns li {
  padding-left: 20px;
  position: relative;
}

.highlights-columns li::before {
  content: "•";
  position: absolute;
  left: 8px;
}

.hero-media {
  display: grid;
  place-items: center;
}

.cta-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn.btn-outline {
  background: transparent;
  color: var(--primary-600);
  border: 1px solid var(--primary-600);
}

.about {
  margin-top: 10px;
}

.about-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.card .highlights {
  margin-top: 8px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-icon {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-blob {
  width: min(280px, 80%);
  aspect-ratio: 1;
  border-radius: 28% 72% 59% 41% / 46% 38% 62% 54%;
  background: radial-gradient(closest-side, rgba(55, 189, 170, 0.18), rgba(94, 200, 242, 0.18));
  display: grid;
  place-items: center;
  position: relative;
}

.hero-emoji {
  font-size: 48px;
}

@media (max-width: 960px) {
  .home-hero .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-intro {
    grid-row: 1;
    grid-column: 1;
  }

  .hero-card-about {
    grid-row: 2;
    grid-column: 1;
  }

  .hero-media {
    grid-column: 1;
    grid-row: 3;
    position: static;
    top: auto;
  }

  .hero-card-focus {
    grid-row: 4;
    grid-column: 1;
  }

  .hero-card-contact {
    grid-row: 5;
    grid-column: 1;
  }

  .highlights-columns {
    grid-template-columns: 1fr;
  }

  .section--white {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0;
  line-height: 1;
}

.item.card {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border-radius: 12px;
  padding: 0px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
  height: auto;
  width: auto;
  min-width: 0;
  margin: 0;
  line-height: 1;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  transform-origin: center;
}


/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 43, 46, 0.4);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(720px, 92vw);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-media {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(135deg, rgba(55, 189, 170, 0.2), rgba(94, 200, 242, 0.2));
}

.modal-body {
  padding: 16px 18px;
}

.modal-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
}

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 120;
  pointer-events: none;
}

.drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 43, 46, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 240ms ease;
}

.drawer[aria-hidden="false"] .drawer-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(920px, 88vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 40px rgba(15, 43, 46, 0.12);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
}

.drawer[aria-hidden="false"] .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  position: sticky;
  top: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}

.drawer-close {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
}

.drawer-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.drawer-body p {
  text-align: justify;
  text-justify: inter-word;
}

.drawer-body img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Hover: only shadow changes smoothly */
.skill.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Optional: subtle press effect */
.skill.card:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Hover: only shadow changes smoothly */
.item.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Optional: subtle press effect */
.item.card:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.hero-img img {
  width: 50%;
  display: block;
  margin: 20px auto;
}

.project .project-media {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, rgba(55, 189, 170, 0.18), rgba(94, 200, 242, 0.18));
  margin-bottom: 10px;
}

.project .project-media img {
  max-width: 100%;
  max-height: 100%;
  min-width: 50%;
  /* ✅ ensures image takes at least 50% of the width */
  min-height: 50%;
  /* ✅ ensures image takes at least 50% of the height */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}