:root {
  --bg: #0e1630;
  --bg-soft: #111b38;
  --panel: #7f8ca4;
  --panel-soft: #8d99af;
  --text-dark: #121b2f;
  --text-light: #d7e0ee;
  --text-muted: #aab6ca;
  --line-soft: rgba(220, 230, 245, 0.24);
  --line-panel: rgba(20, 30, 50, 0.2);
  --cta: #182647;
  --cta-hover: #111d37;
  --radius-lg: 24px;
  --radius-md: 12px;
  --max-width: 1120px;
  --shadow-lg: 0 24px 50px rgba(4, 9, 24, 0.38);
  --shadow-sm: 0 8px 20px rgba(5, 10, 28, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background:
    radial-gradient(circle at 90% 0%, #18284d 0%, transparent 34%),
    radial-gradient(circle at 0% 80%, #1a2746 0%, transparent 38%),
    var(--bg);
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  margin-bottom: 1rem;
  color: #e2e9f5;
}

p {
  margin-top: 0;
}

a {
  color: inherit;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 4rem 0 0.5rem;
  scroll-margin-top: 4.8rem;
}

#skills {
  padding-top: 3.2rem;
  padding-bottom: 0.3rem;
}

#skills h2 {
  margin-bottom: 0.8rem;
}

:focus-visible {
  outline: 3px solid #9ab0d6;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 2000;
  background: #f5f8ff;
  color: #121b2f;
  border: 1px solid #c8d4ec;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.75rem;
}

/* 1. Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 21, 43, 0.82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
}

.navbar {
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-weight: 700;
  color: #eff4ff;
  letter-spacing: 0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #c4d0e3;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: #f1f5ff;
  background: rgba(180, 196, 224, 0.15);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.4rem 0.45rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: #d2ddf1;
  margin: 4px 0;
}

/* 2. Hero */
.hero {
  min-height: calc(100vh - 4.4rem);
  display: flex;
  align-items: center;
  padding: 1.4rem 0 1rem;
}

.hero-panel {
  position: relative;
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-soft) 100%);
  border: 1px solid var(--line-panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.1rem, 2.8vw, 1.9rem);
}

.hero-resume-corner {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.hero-grid {
  min-height: clamp(400px, 62vh, 560px);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  align-items: center;
}

.hero-copy {
  padding-top: 2rem;
  color: var(--text-dark);
  text-align: left;
  align-items: flex-start;
}

.hero-intro {
  margin: 0 0 0.2rem;
  color: #2b3c5f;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.95rem, 4vw, 3.2rem);
  margin-bottom: 0.45rem;
  color: #101b31;
}

.hero-title {
  margin: 0 0 0.8rem;
  font-size: clamp(0.98rem, 1.8vw, 1.12rem);
  color: #2b3c5f;
  font-weight: 600;
  line-height: 1.55;
}

.lead {
  max-width: 54ch;
  color: #2b3b5d;
  font-size: 0.98rem;
  line-height: 1.58;
  text-align: left;
}

.lead p {
  margin-bottom: 0;
}

.lead p + p {
  margin-top: 0.8rem;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
}

.btn-primary {
  color: #f2f6ff;
  background: linear-gradient(130deg, var(--cta) 0%, #22345f 100%);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--cta-hover);
}

.btn-corner {
  color: #f3f6ff;
  background: rgba(16, 27, 49, 0.9);
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
}

.btn-corner:hover,
.btn-corner:focus-visible {
  background: rgba(12, 20, 38, 0.95);
}

.hero-image-wrap {
  justify-self: end;
  width: min(100%, 330px);
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 1px solid rgba(18, 29, 51, 0.22);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.06);
  display: block;
}

/* 4. Skills */
.skills-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "languages aiml"
    "data web"
    "cloud cloud";
  column-gap: 0.95rem;
  row-gap: 0.9rem;
  align-items: start;
}

.skills-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skills-group:nth-child(1) {
  grid-area: languages;
}

.skills-group:nth-child(2) {
  grid-area: aiml;
}

.skills-group:nth-child(3) {
  grid-area: data;
}

.skills-group:nth-child(4) {
  grid-area: web;
}

.skills-group:nth-child(5) {
  grid-area: cloud;
  justify-self: stretch;
  width: 100%;
}

.skills-group h3 {
  margin-bottom: 0;
  color: #e7eef9;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
}

.skills-group-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.35rem 0.45rem;
}

.skill-tile {
  min-height: 78px;
  width: clamp(4.85rem, 7.2vw, 5.8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.34rem;
  padding: 0.28rem 0.18rem 0.24rem;
  color: #dce6f7;
  text-align: center;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.skill-tile:hover,
.skill-tile:focus-within {
  transform: translateY(-1px);
  opacity: 0.98;
}

.skill-icon {
  width: 2.55rem;
  height: 2.55rem;
  padding: 0.34rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid rgba(216, 225, 238, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 20px rgba(4, 10, 28, 0.12);
  color: #f2f6ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
}

.skill-icon-plate-light {
  background: #ffffff;
  border-color: rgba(216, 225, 238, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 20px rgba(4, 10, 28, 0.12);
}

.skill-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: brightness(1.08) saturate(1.02);
}

.skill-logo-custom {
  filter: none;
}

.skill-icon-fallback {
  padding-inline: 0.28rem;
}

.skill-name {
  width: 100%;
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.18;
  color: #d8e3f6;
}

/* 5. Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.15rem;
  align-items: stretch;
}

.project-card {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(18, 29, 56, 0.96), rgba(12, 22, 44, 0.98));
  border: 1px solid rgba(184, 200, 224, 0.18);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(4, 9, 24, 0.22);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(214, 227, 247, 0.32);
  box-shadow: 0 24px 42px rgba(4, 9, 24, 0.3);
}

.project-image-wrapper {
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.15rem 1rem 1.25rem;
  gap: 0.7rem;
}

.project-title {
  margin-bottom: 0;
  color: #e6edf9;
  font-size: 1.02rem;
}

.project-description {
  margin-bottom: 0;
  color: #b8c4d8;
  font-size: 0.94rem;
  line-height: 1.5;
}

.project-github {
  width: 2.8rem;
  height: 2.8rem;
  margin-top: auto;
  border-radius: 999px;
  border: 1px solid rgba(184, 200, 224, 0.22);
  background: linear-gradient(180deg, rgba(24, 39, 71, 0.88), rgba(15, 26, 52, 0.94));
  color: #d6e3f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.project-github svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.project-github:hover,
.project-github:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(214, 227, 247, 0.34);
  background: linear-gradient(180deg, rgba(31, 49, 89, 0.95), rgba(18, 31, 60, 0.98));
  box-shadow: 0 12px 24px rgba(5, 10, 28, 0.22);
}

.project-links {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100%;
  max-width: 140px;
  margin: auto auto 0;
  gap: 0.9rem;
}

.project-links .project-github,
.project-links .project-external {
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 2.8rem;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px;
  border: 1px solid rgba(184, 200, 224, 0.22);
  background: linear-gradient(180deg, rgba(24, 39, 71, 0.88), rgba(15, 26, 52, 0.94));
  color: #d6e3f7;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-links .project-github svg,
.project-links .project-external svg {
  width: 20px;
  height: 20px;
}

.project-links .project-github svg {
  fill: currentColor;
}

.project-links .project-external svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-links .project-github:hover,
.project-links .project-github:focus-visible,
.project-links .project-external:hover,
.project-links .project-external:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(214, 227, 247, 0.34);
  background: linear-gradient(180deg, rgba(31, 49, 89, 0.95), rgba(18, 31, 60, 0.98));
  box-shadow: 0 12px 24px rgba(5, 10, 28, 0.22);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 6. Experience & Education */
.journey-section h2 {
  margin-bottom: 0.7rem;
}

.timeline {
  position: relative;
  margin-top: 1.1rem;
}

.timeline-track {
  position: relative;
  min-height: clamp(760px, 145vh, 1050px);
  padding: 0.4rem 0 0.8rem;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(214, 227, 247, 0.08),
    rgba(214, 227, 247, 0.36),
    rgba(214, 227, 247, 0.08)
  );
}

.timeline-items {
  position: relative;
  z-index: 1;
  min-height: clamp(760px, 145vh, 1050px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.4rem minmax(0, 1fr);
  align-items: center;
  min-height: 4.25rem;
}

.timeline-item-left {
  justify-items: end;
}

.timeline-item-right {
  justify-items: start;
}

.timeline-connector {
  grid-column: 2;
  position: relative;
  justify-self: stretch;
  width: 3.4rem;
  height: 2px;
  background: rgba(214, 227, 247, 0.28);
}

.timeline-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.72rem;
  height: 0.72rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #d6e3f7;
  border: 3px solid #142240;
  box-shadow: 0 0 0 5px rgba(214, 227, 247, 0.1);
}

.timeline-item-left .timeline-card {
  grid-column: 1;
  justify-self: end;
}

.timeline-item-right .timeline-card {
  grid-column: 3;
  justify-self: start;
}

.timeline-card {
  width: min(100%, 340px);
  min-height: 4.25rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  border-radius: 8px;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.timeline-card:focus-visible {
  outline: 2px solid #9ab0d6;
  outline-offset: 4px;
}

.timeline-card:hover,
.timeline-card.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.timeline-item-left .timeline-card {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(216, 225, 238, 0.92);
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 20px rgba(4, 10, 28, 0.12);
  color: #182647;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
}

.timeline-icon img {
  width: 100%;
  height: 100%;
  padding: 0.38rem;
  object-fit: contain;
  display: block;
}

.timeline-card-copy {
  min-width: 0;
}

.timeline-card h3 {
  margin-bottom: 0.16rem;
  color: #e6edf9;
  font-size: 0.98rem;
  line-height: 1.25;
}

.timeline-card p {
  margin-bottom: 0;
  color: #b8c4d8;
  font-size: 0.88rem;
  line-height: 1.35;
}

.timeline-detail-panel {
  position: absolute;
  top: 0;
  z-index: 8;
  width: min(340px, calc(50% - 2.8rem));
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid rgba(214, 227, 247, 0.22);
  border-radius: 8px;
  background: rgba(12, 22, 44, 0.88);
  box-shadow: 0 22px 48px rgba(4, 9, 24, 0.42);
  color: #e7eefb;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.55rem) scale(0.97);
  transform-origin: top center;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.timeline-detail-panel.is-left {
  right: calc(50% + 1.95rem);
}

.timeline-detail-panel.is-right {
  left: calc(50% + 1.95rem);
}

.timeline-detail-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-1rem) scale(1);
}

@supports (backdrop-filter: blur(14px)) {
  .timeline-detail-panel {
    background: rgba(12, 22, 44, 0.72);
    backdrop-filter: blur(14px);
  }
}

.timeline-detail-panel h3 {
  margin: 0 2rem 0.2rem 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.28;
}

.timeline-detail-panel p {
  margin: 0 0 0.7rem;
  color: #c8d3e5;
  font-size: 0.9rem;
  line-height: 1.35;
}

.timeline-detail-panel ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #d4ddec;
  font-size: 0.88rem;
  line-height: 1.45;
}

.timeline-detail-panel li + li {
  margin-top: 0.35rem;
}

.timeline-detail-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid rgba(214, 227, 247, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f6ff;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.timeline-detail-close:hover,
.timeline-detail-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

/* 7. Contact */
#contact .container {
  background: #0f1a34;
  border: 1px solid rgba(184, 200, 224, 0.22);
  border-radius: var(--radius-md);
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

#contact h2 {
  margin-bottom: 0.4rem;
}

#contact > .container > p {
  max-width: 58ch;
  color: #c0cede;
  margin-bottom: 0;
}

.contact-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.22fr);
  gap: 1rem;
  align-items: stretch;
}

.contact-links-panel,
.contact-form-panel {
  background: linear-gradient(180deg, rgba(163, 182, 214, 0.08), rgba(163, 182, 214, 0.04));
  border: 1px solid rgba(184, 200, 224, 0.18);
  border-radius: 16px;
  padding: 1rem;
}

.contact-links-panel h3,
.contact-form-panel h3 {
  margin-bottom: 0.35rem;
  color: #e6edf9;
}

.contact-links-panel p {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.contact-links-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-icon-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-icon-link {
  min-height: 0;
  border-radius: 16px;
  border: 1px solid rgba(184, 200, 224, 0.22);
  background: linear-gradient(180deg, rgba(24, 39, 71, 0.88), rgba(15, 26, 52, 0.94));
  text-decoration: none;
  color: #d6e3f7;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-icon-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: 0 0 auto;
}

.contact-icon-link span {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.contact-icon-link:hover,
.contact-icon-link:focus-visible {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(31, 49, 89, 0.95), rgba(18, 31, 60, 0.98));
  border-color: rgba(214, 227, 247, 0.34);
  box-shadow: 0 14px 28px rgba(5, 10, 28, 0.22);
}

.contact-form {
  display: grid;
  gap: 0.6rem;
}

.contact-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.contact-field {
  display: grid;
  gap: 0.35rem;
}

.form-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.contact-form label {
  color: #dbe6f7;
  font-weight: 600;
  font-size: 0.93rem;
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(184, 200, 224, 0.22);
  border-radius: 12px;
  background: rgba(11, 20, 40, 0.82);
  color: #eef4ff;
  padding: 0.78rem 0.9rem;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #93a4bf;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  border-color: #9ab0d6;
  background: rgba(14, 25, 48, 0.96);
  box-shadow: 0 0 0 4px rgba(154, 176, 214, 0.12);
}

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

.form-status {
  min-height: 1.2rem;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  background: rgba(11, 20, 40, 0.4);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.form-status.is-hidden {
  display: none;
}

.form-status.is-success {
  background: rgba(56, 106, 91, 0.2);
  border-color: rgba(120, 196, 172, 0.34);
  color: #d8f3ea;
}

.form-status.is-error {
  background: rgba(122, 64, 76, 0.2);
  border-color: rgba(229, 164, 178, 0.34);
  color: #ffe0e6;
}

.contact-form .btn {
  justify-self: start;
  border: 0;
  cursor: pointer;
  min-width: 140px;
  padding: 0.68rem 1.15rem;
}

.contact-form .btn:hover,
.contact-form .btn:focus-visible {
  box-shadow: var(--shadow-sm);
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
  text-decoration: underline;
}

/* 8. Footer */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 2.6rem;
  padding: 1.1rem 0 2.1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  color: #aab8cd;
}

.footer-inner a {
  text-decoration: none;
  font-weight: 700;
  color: #d6e3f7;
}

/* Responsive */
@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #skills {
    padding-top: 3.6rem;
    padding-bottom: 0.5rem;
  }

  #skills h2 {
    margin-bottom: 1rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0.95rem;
    min-height: auto;
  }

  .hero-copy {
    padding-top: 2rem;
  }

  .hero-image-wrap {
    justify-self: center;
    width: min(100%, 330px);
    aspect-ratio: 16 / 10;
  }

  .skills-showcase {
    grid-template-columns: 1fr;
    grid-template-areas:
      "languages"
      "aiml"
      "data"
      "web"
      "cloud";
    gap: 1rem;
  }

  .skills-group {
    gap: 0.58rem;
  }

  .skills-group:nth-child(5) {
    justify-self: stretch;
    width: 100%;
  }

  .skills-group h3 {
    font-size: 0.98rem;
  }

  .skills-group-list {
    gap: 0.42rem 0.5rem;
  }

  .skill-tile {
    min-height: 82px;
    width: clamp(5.2rem, 13vw, 6.15rem);
    gap: 0.38rem;
    padding: 0.32rem 0.22rem 0.28rem;
  }

  .skill-icon {
    width: 2.85rem;
    height: 2.85rem;
    padding: 0.42rem;
    border-radius: 11px;
  }

  .skill-name {
    font-size: 0.81rem;
    line-height: 1.25;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr) 3.5rem minmax(0, 1fr);
  }

  .timeline-connector {
    width: 3.5rem;
  }

  .timeline-card {
    width: min(100%, 320px);
  }

  .timeline-detail-panel {
    width: min(320px, calc(50% - 2.6rem));
  }

  .contact-links-panel,
  .contact-form-panel {
    padding: 1rem;
  }

  .section {
    padding-top: 3.6rem;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 1.4rem, var(--max-width));
  }

  .menu-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 4.4rem;
    right: 1rem;
    flex-direction: column;
    min-width: 11.5rem;
    background: #0f1b37;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 0.55rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .nav-links.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hero {
    min-height: auto;
    padding-top: 1.25rem;
  }

  .hero-panel {
    border-radius: 18px;
    padding: 0.95rem;
  }

  .skills-group-list {
    gap: 0.34rem 0.42rem;
  }

  .hero-resume-corner {
    top: 0.75rem;
    left: 0.75rem;
  }

  .hero-copy {
    padding-top: 1.95rem;
  }

  .lead {
    font-size: 0.95rem;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

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

  .timeline {
    margin-top: 0.8rem;
  }

  .timeline-track,
  .timeline-items {
    min-height: auto;
  }

  .timeline-items {
    gap: 1.55rem;
  }

  .timeline-line {
    left: 1.25rem;
  }

  .timeline-item,
  .timeline-item-left,
  .timeline-item-right {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    justify-items: stretch;
  }

  .timeline-item-left .timeline-card {
    flex-direction: row;
    text-align: left;
  }

  .timeline-connector,
  .timeline-item-left .timeline-connector,
  .timeline-item-right .timeline-connector {
    grid-column: 1;
    width: 2.5rem;
  }

  .timeline-connector::after,
  .timeline-item-left .timeline-connector::after,
  .timeline-item-right .timeline-connector::after {
    left: 50%;
  }

  .timeline-item-left .timeline-card,
  .timeline-item-right .timeline-card,
  .timeline-card {
    grid-column: 2;
    justify-self: stretch;
    width: min(100%, 420px);
  }

  .timeline-detail-panel,
  .timeline-detail-panel.is-left,
  .timeline-detail-panel.is-right {
    left: 3rem;
    right: 0;
    width: auto;
    max-width: calc(100% - 3rem);
  }

  .contact-form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .skills-group-list {
    gap: 0.3rem 0.34rem;
  }

  .skill-tile {
    min-height: 78px;
    width: calc(50% - 0.2rem);
    gap: 0.32rem;
    padding: 0.24rem 0.12rem 0.18rem;
  }

  .skill-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.34rem;
  }

  .skill-name {
    font-size: 0.73rem;
  }

  .contact-icon-link {
    padding: 0.7rem 0.8rem;
  }

  .timeline-item,
  .timeline-item-left,
  .timeline-item-right {
    grid-template-columns: 2.1rem minmax(0, 1fr);
  }

  .timeline-line {
    left: 1.05rem;
  }

  .timeline-connector,
  .timeline-item-left .timeline-connector,
  .timeline-item-right .timeline-connector {
    width: 2.1rem;
  }

  .timeline-icon {
    width: 52px;
    height: 52px;
  }

  .timeline-card h3 {
    font-size: 0.94rem;
  }

  .timeline-card p,
  .timeline-detail-panel ul {
    font-size: 0.86rem;
  }

  .contact-form .btn {
    width: 100%;
    justify-self: stretch;
  }
}
