@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap");

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

:root {
  --bg-wave: #c8dff0;
  --glass: rgba(255, 255, 255, 0.75);
  --glass2: rgba(255, 255, 255, 0.6);
  --glass3: rgba(255, 255, 255, 0.82);
  --border-g: rgba(91, 159, 212, 0.2);
  --border-g2: rgba(91, 159, 212, 0.4);
  --text: #0f2d45; /* was #1a3a52 — deeper navy */
  --muted: #2e4d63; /* was #4a6070 — much darker */
  --subtle: #4a6e85; /* was #7a9db0 — darker mid-tone */
  --accent: #2e7fbf; /* was #5b9fd4 — richer blue */
  --accent2: #1a5c96; /* was #2a6fa8 — deeper hover */
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 10px;
  --radius-lg: 20px;
}

body {
  font-family: var(--sans);
  background-color: var(--bg-wave);
  background-image: url("/static/bg.png");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 48px 64px;

  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 48px rgba(100, 160, 220, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  /* Give breathing room from viewport edges */
  margin-top: 40px;
  margin-bottom: 64px;
  margin-left: auto;
  margin-right: auto;
  /* Use a wrapping div in body if needed, or add to body padding */
}

/* ── Header ────────────────────────────────── */
.header {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(100, 160, 210, 0.18);
  position: relative;
}

.header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.profile-section {
  flex: 2;
  min-width: 240px;
}

.name {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.about {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  font-weight: 300;
}

.contact-section {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  padding-top: 6px;
}

.contact-link {
  color: var(--subtle);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s;
}

.contact-link span {
  font-size: 13px;
  opacity: 0.8;
}
.contact-link:hover {
  color: var(--accent2);
}

/* ── Skills ────────────────────────────────── */
.skills-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed rgba(100, 160, 210, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-group {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.skill-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 110px;
  padding-top: 4px;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1;
}

.skill-tag {
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(91, 159, 212, 0.08);
  border: 1px solid rgba(91, 159, 212, 0.25);
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, background 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  background: rgba(91, 159, 212, 0.15);
}

/* ── Navigation ────────────────────────────── */
.nav-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-g);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 20px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--subtle);
  font-family: var(--sans);
  transition: background 0.18s, color 0.18s;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent2);
  box-shadow: 0 1px 4px rgba(91, 159, 212, 0.15);
}

.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

/* ── List items ────────────────────────────── */
.section-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  background: var(--glass2);
  border: 1px solid var(--border-g);
  border-radius: var(--radius);
  padding: 20px 22px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}

.list-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.list-item:hover {
  background: var(--glass3);
  border-color: var(--border-g2);
}

.list-item:hover::before {
  opacity: 1;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.item-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}

.item-subtitle {
  font-size: 0.82rem;
  color: var(--subtle);
  font-weight: 400;
}

.item-duration {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 5px 0 7px;
}

.item-description {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 300;
}

/* ── Meta row (detail view) ────────────────── */
.meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #2e4d63;
    text-decoration: none;
    background: rgba(46, 127, 191, 0.07);
    border: 1px solid rgba(46, 127, 191, 0.25);
    padding: 5px 13px;
    border-radius: 6px;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    word-break: break-all;
}

.github-link:hover {
    background: rgba(46, 127, 191, 0.14);
    border-color: var(--accent);
    color: var(--accent2);
}

.github-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.75;
}

.detail-divider {
    border: none;
    border-top: 1px solid rgba(46, 127, 191, 0.12);
    margin: 20px 0;
}

/* ── GitHub badge on list cards ────────────── */
.item-github-badge {
    display: inline-flex;
    align-items: center;
    color: var(--subtle);
    opacity: 0.6;
}

/* ── Detail view ───────────────────────────── */
.detail-view {
  background: var(--glass2);
  border: 1px solid var(--border-g);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  animation: fadeSlide 0.22s ease-out;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-view h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin: 20px 0 8px;
}

.detail-view .item-duration {
  margin-bottom: 20px;
}

.detail-view .item-description {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--muted);
}

.back-btn {
  background: transparent;
  border: 1px solid var(--border-g);
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--sans);
  transition: border-color 0.18s, color 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent2);
}

/* ── Preview iframe ────────────────────────── */
.preview-section {
  margin-top: 24px;
  border: 1px solid var(--border-g);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

/* ── Footer ────────────────────────────────── */
.footer {
  text-align: center;
  color: var(--subtle);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(91, 159, 212, 0.15);
}
