/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:       #FDF6E3;
  --bg-card:  #fff8ec;
  --accent:   #8cf9db;
  --amber:    #B58900;
  --text:     #1a1614;
  --text-mid: #3d3530;
  --text-dim: #7a6a5a;
  --line:     rgba(0, 0, 0, 0.07);
  --shadow:   0 2px 12px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--amber);
  text-decoration: none;
  transition: opacity 0.15s;
}
a:hover { opacity: 0.7; }

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

/* ── Container ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ── Nav ── */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 227, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: -0.02em;
  margin-right: 0;
}
.brand:hover { opacity: 0.8; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  margin-right: 0;
}

/* ── Hero ── */
.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.profile-image {
  width: 160px;
  height: 160px;
  border-radius: 1.25rem;
  object-fit: cover;
  object-position: top;
  border: 4px solid var(--accent);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.hero-text .title {
  color: var(--amber);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
}

.hero-text .bio {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(140, 249, 219, 0.15);
  border: 1px solid rgba(140, 249, 219, 0.5);
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  margin-right: 0;
  transition: background 0.15s, opacity 0.15s;
}
.btn-ghost:hover { background: rgba(140, 249, 219, 0.28); opacity: 1; }

.btn-ghost svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ── Section ── */
.section { padding: 3.5rem 0; }

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading.centered {
  text-align: center;
}

.section-heading h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.heading-bar {
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 9999px;
  background: var(--accent);
}

.section-heading.centered .heading-bar {
  margin: 0 auto;
}

/* ── Experience Tabs ── */
.exp-tabs {
  display: flex;
  align-items: stretch;
  min-height: 220px;
}

.exp-companies {
  display: flex;
  flex-direction: column;
  flex: 0 0 180px;
}

.exp-tab {
  background: none;
  border: none;
  border-left: 2px solid var(--line);
  cursor: pointer;
  text-align: left;
  padding: 0.9rem 1.1rem;
  font-family: Arial, sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.exp-tab:hover {
  background: rgba(140, 249, 219, 0.08);
  border-left-color: rgba(140, 249, 219, 0.5);
}
.exp-tab.active {
  border-left-color: var(--accent);
  background: rgba(140, 249, 219, 0.12);
}

.exp-tab-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s;
}
.exp-tab.active .exp-tab-name { color: var(--amber); }

.exp-tab-period {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Center vertical line */
.exp-line {
  width: 2px;
  flex-shrink: 0;
  background: rgba(140, 249, 219, 0.4);
}

/* Detail panels */
.exp-panels {
  flex: 1;
  padding: 0.5rem 0 0.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
}

.exp-panel { display: none; }
.exp-panel.active { display: block; }

.exp-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.exp-at {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.exp-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-mid);
}

/* ── Projects ── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.project-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 255, 255, 0.6) 100%);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.2, 0.3, 0.25, 0.46);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(140, 249, 219, 0.15);
  transform: translateY(-4px);
  border-color: rgba(140, 249, 219, 0.3);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-top h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.project-link {
  color: var(--amber);
  flex-shrink: 0;
  margin-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0.6rem;
  background: rgba(181, 137, 0, 0.08);
  transition: all 0.3s ease;
}

.project-link:hover {
  background: rgba(181, 137, 0, 0.15);
  transform: scale(1.08);
}

.project-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.project-card p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-mid);
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #0d6e63;
  background: linear-gradient(135deg, rgba(140, 249, 219, 0.15), rgba(140, 249, 219, 0.08));
  border: 1px solid rgba(140, 249, 219, 0.4);
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.tag:hover {
  background: linear-gradient(135deg, rgba(140, 249, 219, 0.25), rgba(140, 249, 219, 0.15));
  border-color: rgba(140, 249, 219, 0.6);
  transform: translateY(-1px);
}

/* ── Contact ── */
.section-contact { text-align: center; }

.contact-sub {
  font-size: 0.875rem;
  color: var(--text-mid);
  max-width: 340px;
  margin: 0.5rem auto 1.5rem;
  line-height: 1.6;
}

.btn-primary {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f4f42;
  background: var(--accent);
  padding: 0.7rem 1.75rem;
  border-radius: 0.5rem;
  margin-right: 0;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }

  .hero { padding: 2.5rem 0 2rem; }
  .hero-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .profile-image { width: 130px; height: 130px; }
  .hero-text .bio { margin-left: auto; margin-right: auto; }
  .social-links { justify-content: center; }

  /* Mobile experience tabs: horizontal scroll on top */
  .exp-tabs {
    flex-direction: column;
  }
  .exp-companies {
    flex-direction: row;
    flex: none;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .exp-companies::-webkit-scrollbar { display: none; }
  .exp-tab {
    border-left: none;
    border-bottom: 2px solid var(--line);
    padding: 0.65rem 1rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .exp-tab:hover { border-bottom-color: rgba(140, 249, 219, 0.5); }
  .exp-tab.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
  .exp-line {
    width: 100%;
    height: 2px;
    display: none;
  }
  .exp-panels {
    padding: 1.25rem 0 0;
  }

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

  .section { padding: 2.5rem 0; }
}

@media (max-width: 400px) {
  .nav-links { gap: 0.6rem; }
}
